<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to WWW" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^mywebsite.com$" />
</conditions>
<action type="Redirect" url="http://mywebsite.com/"
redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
该代码有效: 如果是website.com,则会将您链接到另一个
但是,我想要它,如果它不是website.com,它会链接你