WordPress固定连接404错误解决方法

目录

前言

初次安装WordPress,大部分人都会更改默认的固定连接设置以达到美化网页URL或是优化SEO目的。但更改固定连接后往往会出现一些未知的错误,以下为WordPress更改固定连接后,访问文章或者网页出现404错误的解决方法。

Nginx 解决方法

编辑 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.

订阅评论
提醒
guest

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

0 评论
最新
最旧
内联反馈
查看所有评论
滚动到顶部