Windows server 2008 IIS7.5虚拟主机下实现301域名重定向
web.config文件代码如下:
<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name=”WWW Redirect” stopProcessing=”true”>
<match url=”.*” />
<conditions>
<add input=”{HTTP_HOST}” pattern=”^mrlian.com$” />
</conditions>
<action type=”Redirect” url=”http://www.mrlian.com/{R:0}” redirectType=”Permanent” />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>