【2014-04-11】lnmp-nginx系统wordpress后台所有链接点击出现404的解决方法

发布时间:2026/8/20 23:02:11
【2014-04-11】lnmp-nginx系统wordpress后台所有链接点击出现404的解决方法 [历史归档]本文原发布于 cstriker1407.info 个人博客内容为历史存档仅供参考。发布时间2014-04-11 标题lnmp-nginx系统wordpress后台所有链接点击出现404的解决方法分类编程 / vps wordpress / web 标签vps wordpress·404lnmp-nginx系统wordpress后台所有链接点击出现404的解决方法标准方法二级域名解决方法详细的说明请参考【 http://www.jannn.com/2091.html 】。这里简单的备注下标准方法进入 conf 文件夹cd/usr/local/nginx/conf/修改 wordpress.conf 文件在最后添加上一行rewrite /wp-admin$ $scheme://$host$uri/ permanent;保存后使用下面的命令来测试下修改语法是否OK/usr/local/nginx/sbin/nginx-t最后重启下 nginx 就可以了。二级域名解决方法和上述一样不过添加的内容要改一下以作者的blog为例作者的blog是【 cstriker1407.info/blog 】因此需要在前面加上前缀 blog。修改后的 wordpress.conf 如下location /blog/ { 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 (.*) /blog/index.php; } } rewrite /blog/wp-admin$ $scheme://$host$uri/ permanent;前缀也可以参考【 http://116.62.110.235/blog/lnmp-pseudo-static-rules-set/ 】