To add an example .com Redirect to www.example.com , configure web.config As follows: <? 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 = " //www.example.com/ {R:0}" redirectType = "Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
|