IIS 将所有请求重写为静态 url

IIS rewrite all request to a static url

我有 http://xyz.it/page1 to http://xyz.it/pageN and I need to redirect all pages to 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 to http://bar.it/page1,我不明白我哪里错了。

请帮忙!

<rule name="from-xyz-to-bar" stopProcessing="true">
    <match url="^$" />
    <action type="Redirect" url="http://bar.it/foo" />
</rule>