如何为 iis 重定向到 www1 -> www 创建规则
how to create rule for iis redirection to www1 -> www
如何为 IIS 重定向 www1 域到 www 创建规则。
示例 www1.xyz.com -> www.xyz.com
如果你想从www1重定向到www,可以参考这个link:
<rule name="redirect to www" enabled="false" stopProcessing="true">
<match url="^(.*)$" />
<conditions>
<add input="{HTTP_HOST}" pattern="www1.example.com" />
</conditions>
<action type="Redirect" url="http://www.example.com/{R:1}" />
</rule>
如何为 IIS 重定向 www1 域到 www 创建规则。 示例 www1.xyz.com -> www.xyz.com
如果你想从www1重定向到www,可以参考这个link:
<rule name="redirect to www" enabled="false" stopProcessing="true">
<match url="^(.*)$" />
<conditions>
<add input="{HTTP_HOST}" pattern="www1.example.com" />
</conditions>
<action type="Redirect" url="http://www.example.com/{R:1}" />
</rule>