On Windows Server 2008 IIS 7.5
You can add rewrite rule in web.config file to redirect domain.com to www.domain.com
Replace domain.com with your domain
<?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration>
<system.webServer>
<rewrite> <rules> <rule name="Canonical host name"> <match url="^(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^www\.domain\.com$" negate="true" /> </conditions> <action type="Redirect" url="http://www.domain.com/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
<?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration>
|