【问题标题】:how to solve the redirect url loop error in wp config wordpress如何解决 wp config wordpress 中的重定向 url 循环错误
【发布时间】:2014-01-19 23:56:16
【问题描述】:

我的网站在 wordpress 上,我想将我的网站从 icap.org.pk 重定向到 www.icap.org.pk ,但是当我在 wp 中更改时.config 文件显示错误“页面未正确重定向”。

这是我的代码,请建议我如何做到这一点:

`<?xml version="1.0" encoding="UTF-8"?>
 <configuration>
 <system.webServer>
<rewrite>
  <rules>
   <rule name="Redirect to WWW" stopProcessing="true">
      <match url=".*" />
      <conditions>
        <add input="{HTTP_HOST}" pattern="^icap.org.pk$" />
      </conditions>
<action type="Redirect" url="http://www.icap.org.pk/{R:0}" redirectType="Permanent" />
</rule>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule>
</rules>
</rewrite>

`

【问题讨论】:

    标签: php wordpress http-redirect


    【解决方案1】:

    According to the above link您的 web.config 很好,问题很可能出在您的 wordpress 选项的数据库表中。.解决方案:登录数据库并确保将 url 设置为带 www 而不是不带 www。

    【讨论】:

    • 是的 thnx 问题现在已经解决了,我只是删除了 .htaccess 文件,然后用“www”更新了 wp-option 表中的 URL。我的托管服务提供商也在 webconfig 文件中进行了更改。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-07-10
    • 1970-01-01
    • 2015-12-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-28
    相关资源
    最近更新 更多