Linode lnmp下,wordpress伪静态后,后台页面打不开的解决办法

Linode lnmp下,wordpress伪静态后,后台页面打不开的解决办法

有个网站备案在湖南,不知道什么原因给取消备案了。国内机房都不给放,只能放linode了。可是搬迁过去后,前台可以打开,后台老是404.google一下解决办法:

打开目录 找到wordpress.conf这个文件。不知道在哪里的同学,看下面的路径。

/usr/local/nginx/conf/wordpress.conf

把wordpress.conf文件里面的原有的静态规则全部删除,复制粘贴以下代码


location / {
index index.html index.php;
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;
}
}

最后一步,重启nginx

# /usr/local/nginx/sbin/nginx -s reload

添加一条评论 »本文还没有评论

Copyright © All Rights Reserved · Green Hope Theme by Sivan & schiy · Powered by Proudly powered by WordPress.