【问题标题】:index.php? in the beginning of WordPress permalink redirects to homepage索引.php?在 WordPress 的开头永久链接重定向到主页
【发布时间】:2020-09-28 16:01:59
【问题描述】:

我正在将一个网站从自定义 PHP 系统迁移到 WordPress。旧的 url 结构是 example.com/index.php?postname。我在functions.php中添加了一个代码,以便以这种方式设置永久链接结构,并且它已更新,但每次我尝试访问帖子时,我都会被重定向到主页。为什么会这样?

非常感谢您!

【问题讨论】:

  • example.com/index.php?postname 表示浏览器将点击example.com/index.php 并获取参数postname。所以你正在访问example.com/index.php
  • 谢谢,请问有什么办法可以改变吗?

标签: php wordpress permalinks


【解决方案1】:

好的,我发现了?在网址中导致问题。我仍在寻找一种在不破坏网站的情况下添加它的方法。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-14
    • 2016-02-11
    • 2017-12-20
    • 2017-04-19
    • 2015-12-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多