wordpress permalink 수정 후 404 문제 복구
1118 단어 WORDPRESS
httpd. conf 수정
열다
Apacha 프로필 코드
LoadModule rewrite_module modules/mod_rewrite.so
찾기 및 교체
Apach 프로필 코드
AllowOverride none -> AllowOverride All
2. nginx 를 서버 로 사용 하면 Nginx 설정 파일 에 location 세그먼트 에 다음 코드 를 추가 하면 됩 니 다.
주: lnmp 원 키 설치 패키지, 이 프로필 경 로 는 보통 / usr / local / nginx / conf / vhost / 도 메 인 이름. conf 입 니 다.
저장 후 실행 /usr / local / nginx / sbin / nginx - s reload 부 드 럽 게 nginx 를 다시 시작 하면 유효 합 니 다.
location ~ \.php$ {
# root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}