IIS7.5下 web.config做301跳转的方法

分类 域名帮助 阅读368 次 发布日期 2018-04-24
把红色地方的网址换成你自己的,多个跳转多个规则


<rule name="WWW Redirect" stopProcessing="true">

<match url=".*" />

<conditions>

<add input="{HTTP_HOST}" pattern="^hmw146142.chinaw3.com$" />

</conditions>

<action type="Redirect" url="http://www.greatidc.com/{R:0}"

redirectType="Permanent" />

</rule>


<rule name="WWW Redirect2" stopProcessing="true">

<match url=".*" />

<conditions>

<add input="{HTTP_HOST}" pattern="^greatidc.com$" />

</conditions>

<action type="Redirect" url="http://www.greatidc.com/{R:0}"

redirectType="Permanent" />

</rule>