wordpress - 对于我网站的每个 WordPress 页面,为什么我有两个 URL?
问题描述
在我的网站中,我将自定义结构永久链接设置为“/post/%postname%”。我想要单个博客文章的 URL,例如 domain/post/postname,它工作正常,但除此之外,网站的每个页面都遵循 domain/post/pagename 和 domain/pagename URL,但对于页面,我只想要域/页面名称。
这两个 URL 都登陆同一页面
https://shergroup.com/aboutus https://shergroup.com/post/aboutus
解决方案
将永久链接从设置更改为 http://localhost/yoursitename/sample-post/ 在页面上,简单的帖子将更改为页面名称。在你的网站中,如果你想显示一个像https://shergroup.com/aboutus/blog/这样的博客页面,你需要在页面中将 web 的 slug 从 /blogs/ 更改为 aboutus/blogs我的意见,没关系。
推荐阅读
- r - 需要帮助在 x 轴 ggplot 图上每 10 年显示一次
- java - 如何在 knife.fromHtml() 中留出空格、转到下一行、下划线或使字符加粗?\n, \t, \r 没有任何效果
- python-3.x - 如何根据值获取列名
- javascript - 将未定义作为属性放置到窗口对象的原因?
- amazon-cloudformation - 属性 Targets 的值必须是对象列表“AWS::ElasticLoadBalancingV2::TargetGroup”错误
- javascript - 如何在 PHP 中使用 Ajax 和 Jquery 进行图像裁剪并上传到文件夹并将名称保存在数据库中
- reactjs - 未处理的拒绝 (SecurityError):操作不安全。在一个新的 create-react-app 项目上
- linux - 将 3 列合并为 1
- python - beautifulSoup soup.select() 为 css 选择器返回空
- php - if else 语句 PHP 中出现意外的“<”