【问题标题】:IIS rewrite all request to a static urlIIS 将所有请求重写为静态 url
【发布时间】:2015-08-05 03:56:23
【问题描述】:

我有http://xyz.it/page1http://xyz.it/pageN,我需要将所有页面重定向到http://bar.it/foo,我想我已经用这个规则解决了它:

    <rule name="from-xyz-to-bar" stopProcessing="true">
        <match url=".*" />
        <conditions logicalGrouping="MatchAny">
            <add input="{HTTP_HOST}" pattern="^xyz\.it$" />
        </conditions>
        <action type="Redirect" url="http://bar.it/foo" appendQueryString="false" redirectType="Permanent" />
    </rule>

但它不起作用。我的规则正在做的是将http://xyz.it/page1 重定向到http://bar.it/page1,我不明白我错在哪里。

请帮忙!

【问题讨论】:

  • 你还有什么规定吗?您确定没有遇到缓存问题吗?
  • 在隐身模式和不同的浏览器上试过。

标签: iis url-rewriting


【解决方案1】:
<rule name="from-xyz-to-bar" stopProcessing="true">
    <match url="^$" />
    <action type="Redirect" url="http://bar.it/foo" />
</rule>

【讨论】:

  • 否定。两个域的 IIS 站点是相同的,实际上只有少数域。
猜你喜欢
  • 2018-11-29
  • 1970-01-01
  • 2017-06-01
  • 2021-07-29
  • 1970-01-01
  • 1970-01-01
  • 2013-12-03
  • 2011-02-03
  • 1970-01-01
相关资源
最近更新 更多