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

2021-03-26 09:05 锐途网 主页 > 网站运营 > 域名 >
浏览
把红色地方的网址换成你自己的,多个跳转多个规则

 

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

<match url=".*" />

<conditions>

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

</conditions>

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

redirectType="Permanent" />

</rule>

 

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

<match url=".*" />

<conditions>

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

</conditions>

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

redirectType="Permanent" />

</rule>