初次安装WordPress,大部分人都会更改默认的固定连接设置以达到美化网页URL或是优化SEO目的。但更改固定连接后往往会出现一些未知的错误,以下为WordPress更改固定连接后,访问文章或者网页出现404错误的解决方法。
编辑 WordPress 的Nginx conf 文件,添加以下代码。
location /
{
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
保存文件并重载 Nginx 配置(或者可以重启 Nginx)。
发表评论须遵守中华人民共和国相关法律法规。违规评论将会被删除。
Comments must subject to the relevant laws and regulations of the People’s Republic of China. Offending comments will be deleted.
WordPress是目前流行的开源内容管理系统(C…
完成 WordPress 安装后,WordPres…
WordPress是目前流行的开源内容管理系统(C…