【问题标题】:Redirect Loop - IIS7重定向循环 - IIS7
【发布时间】:2013-05-18 23:43:43
【问题描述】:

使用重写模块在 IIS7 上使用以下规则时获取重定向循环。

         <rule name="redirect" stopProcessing="true">
      <match url="test" />
      <conditions>
        <add input="{HTTP_HOST}" pattern="domain.com$" />
      </conditions>
      <action type="Redirect" url="http://www.domain.com/new/test" appendQueryString="false" redirectType="Permanent" />
    </rule>

有什么想法吗?

谢谢

【问题讨论】:

    标签: redirect iis-7 rewrite


    【解决方案1】:

    您似乎正在尝试从 http://domain.com 重定向到 http://www.domain.com

    相信正确的模式应该是“^domain\.com$”

    这匹配“domain.com”的整个 HTTP_HOST 值

    【讨论】:

    • 有道理,现在就试试。谢谢
    • 由于某种原因,将 ^ 应用于匹配 url 值,即 实际上已修复它。谢谢
    猜你喜欢
    • 2010-10-19
    • 2013-04-14
    • 2013-05-12
    • 2012-03-31
    • 2017-02-11
    • 2013-07-28
    • 2015-03-21
    • 2017-05-17
    • 2015-08-31
    相关资源
    最近更新 更多