Wordpress permalink '이 서버에서 찾을 수 없습니다'
워드프레스 사이트를 새 호스트로 옮겼어요그러나 홈 페이지를 제외한 다른 페이지로 이동하면 다음과 같은 오류가 나타납니다.
Not Found
The requested URL /about was not found on this server.
Apache/2.2.16 (Debian) Server at 176.xx.yy.zz Port 80
Permalink 설정을 Default로 변경하여 URL을 다음과 같이 표시했습니다.mysite.com/?page_id=5
페이지가 잘 표시됩니다.그래서 제 코드에 문제가 없어요.
내 첫 번째 추측은mod_rewrite
활성화 되어 있지 않습니다.그렇지만phpinfo()
라고 한다mod_rewrite
가 올바르게 로딩되어 있습니다.
.htaccess는 자동으로 생성되며 다음과 같습니다.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /beta-test/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /beta-test/index.php [L]
</IfModule>
# END WordPress
해결방법은?
감사해요.
Apache를 편집해야 합니다.http.conf
파일 및
바꾸다#LoadModule rewrite_module modules/mod_rewrite.so
로.LoadModule rewrite_module modules/mod_rewrite.so
http.conf가 존재하지 않는 Apache2 버전(예: ubuntu)에서는 a2enmod rewrite 명령을 사용하여 모듈을 활성화할 수 있습니다.
.htaccess 파일이 있는 경우, 이는 Apache rewrite 모듈이 새 서버에서 활성화되지 않은 것이 원인일 수 있습니다.Ubuntu에서는 다음을 수행합니다.
sudo a2enmod rewrite
sudo apache2ctl restart
이것도 이 세 가지 문제 때문일 거라고 생각합니다.
- AccessFileName .htaccess는 Apache Configuration에 코멘트되어 있습니다.
- 워드프레스 경로에 대한 Apache 구성에서 AllowOverride ALL이 언급되지 않았습니다.
이는 재작성 규칙에 정의된 경로에 문제가 있을 수 있습니다.
.htaccess 파일의 개서 규칙에서 다음 사항을 변경하는 것을 검토해 주십시오.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
나한테는 효과가 있었어.
이것은 간단합니다.실행:
shell > a2enmod rewrite enable
apache2에서 실행 중인 경우.
언급URL : https://stackoverflow.com/questions/19018702/wordpress-permalink-not-found-on-this-server
'programing' 카테고리의 다른 글
jQuery와 jQuery의 차이점각진JS와 Node.js의 비교 (0) | 2023.03.23 |
---|---|
Oracle 11g에서 테이블스페이스 간에 테이블을 이동하는 방법 (0) | 2023.03.23 |
속성에 따옴표 없이 JSON.stringify를 지정하시겠습니까? (0) | 2023.03.23 |
미디어 파일 워드프레스를 모두 받을 수 있는 기능은 무엇입니까? (0) | 2023.03.23 |
보기에서 응용프로그램/json MIME 유형 강제 적용(플래스크) (0) | 2023.03.23 |