Wordpress自定义永久链接将帖子重定向到根目录
我的博客url类似于Wordpress自定义永久链接将帖子重定向到根目录,wordpress,permalinks,Wordpress,Permalinks,我的博客url类似于www.example.com/blog,我的帖子url类似于https://www.example.com/blog/index.php/postname和永久链接设置为自定义/index.php/%postname%/ 我想删除博文url的blog/index.php,以便博文url是https://www.example.com/post-name 如果我将永久链接更改为与/%postname%/一起使用custom,它会将我的帖子重定向到404页面 您需要在.htac
www.example.com/blog
,我的帖子url类似于https://www.example.com/blog/index.php/postname
和永久链接设置为自定义/index.php/%postname%/
我想删除博文url的blog/index.php,以便博文url是https://www.example.com/post-name
如果我将永久链接更改为与/%postname%/
一起使用custom,它会将我的帖子重定向到404页面
您需要在
.htaccess
或类似版本(取决于所使用的服务器守护进程)中在服务器上编写自定义URL重写。Hi@belinus感谢您的回复。我已经试过了。htaccess。实际上是因为我的服务器nginx没有处理.htccess。现在问题解决了。