前言
大概两个月前我把wordpress的安装目录从主目录修改成了子目录,然后发现只能正常打开主页和后台,文章和其它页面无法打开
解决办法
修改伪静态规则,在/index.php?$args;前添加路径
location / { try_files $uri $uri/ /子目录路径/index.php?$args; } rewrite /wp-admin$ $scheme://$host$uri/ permanent; location ~* ^/wp-content/uploads/.*\.php$ { deny all; }
参考文章
评论
还没有任何评论,你来说两句吧!