wordpress后台404页面

江枫思渺然 提交于 2019-11-28 11:48:12

就在刚刚,boss需要看公司网站后台,网站是用wordpress搭的,发现全是404,蛋疼,于是google,下面是解决办法:

location / {
        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;
         }
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

加上这句rewrite /wp-admin$ $scheme://$host$uri/ permanent,然后重启nginx就好了

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!