如要將(jiāng)example.com
重定向(xiàng)到(dào)www.example.com,則配置web.config
如下:
<?xml version="1.0"
encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule
name="www"
stopProcessing="true">
<match
url=".*"
/>
<conditions>
<add
input="{HTTP_HOST}"
pattern="^example\.com$"
/>
</conditions>
<action
type="Redirect"
url="http://www.example.com/{R:門慢0}"
redirectType="Permanent"子兒
/>
</rule>
</rules>
</rewrite>謝多;
</system.webServer>
</configuration>
0592-8833123
0592-8399399