实现xxxx.com的301跳转到www.xxxx.com方法
只需要复制以下代码,把以下域名xxxx.com替换您自己的域名,放到到程序目录web.config配置文件中的<system.webServer>字段内即可
<rewrite>
<rules>
<rule name=”301″ patternSyntax=”Wildcard” stopProcessing=”true”>
<match url=”*” />
<conditions>
<add input=”{HTTP_HOST}” pattern=”xxxx.com” />
</conditions>
<action type=”Redirect” url=”http://xxxx.com/{R:0}” />
</rule>
</rules>
</rewrite>