首页 > 解决方案 > 对于我网站的每个 WordPress 页面,为什么我有两个 URL?

问题描述

在我的网站中,我将自定义结构永久链接设置为“/post/%postname%”。我想要单个博客文章的 URL,例如 domain/post/postname,它工作正常,但除此之外,网站的每个页面都遵循 domain/post/pagename 和 domain/pagename URL,但对于页面,我只想要域/页面名称。

这两个 URL 都登陆同一页面

https://shergroup.com/aboutus https://shergroup.com/post/aboutus

我只想要https://shergroup.com/aboutus页面。

标签: wordpressurlpermalinks

解决方案


将永久链接从设置更改为 http://localhost/yoursitename/sample-post/ 在页面上,简单的帖子将更改为页面名称。在你的网站中,如果你想显示一个像https://shergroup.com/aboutus/blog/这样的博客页面,你需要在页面中将 web 的 slug 从 /blogs/ 更改为 aboutus/blogs我的意见,没关系。


推荐阅读