WP新站,只安装了远程附件和备份两个插件。添加了筛选功能后,固定链接里去掉index.php之后筛选页面出现404;
解决方法:
找到配置文件:
- server
- {
- listen 80;
- server_name logo.doooor.com;
- index index.php index.html index.htm default.php default.htm default.html;
- root /www/wwwroot/logo.doooor.com;
- #error_page 404/404.html;
- error_page 404 /404.html;
- error_page 502 /502.html;
-
- include enable-php-70.conf;
- include /www/server/panel/vhost/rewrite/logo.doooor.com.conf;
- location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
- {
- expires 30d;
- access_log off;
- }
- location ~ .*\.(js|css)?$
- {
- expires 12h;
- access_log off;
- }
- access_log /www/wwwlogs/logo.doooor.com.log;
- }
复制代码 添加一段:
- try_files $uri $uri/ /index.php?$args;
复制代码
最终结果为:
- server
- {
- listen 80;
- server_name logo.doooor.com;
- index index.php index.html index.htm default.php default.htm default.html;
- try_files $uri $uri/ /index.php?$args;
- root /www/wwwroot/logo.doooor.com;
- #error_page 404/404.html;
- error_page 404 /404.html;
- error_page 502 /502.html;
-
- include enable-php-70.conf;
- include /www/server/panel/vhost/rewrite/logo.doooor.com.conf;
- location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
- {
- expires 30d;
- access_log off;
- }
- location ~ .*\.(js|css)?$
- {
- expires 12h;
- access_log off;
- }
- access_log /www/wwwlogs/logo.doooor.com.log;
- }
复制代码 保存,重启nginx。
|