Redirect not www to www in asp.net website.

the following goes in the web.config file in <system.webServer> section :


<rewrite>
<rules>
<rule name="Redirect domain.com to www" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{HTTP_HOST}" pattern="domain.com.au" />
</conditions>
<action type="Redirect" url="http://www.domain.com.au/{R:0}" />
</rule>
</rules>
</rewrite>
Previous
Next Post »
Thanks for your comment