Reputation: 13367
I want to set redirect from www.MySite.com to MySite.com for my asp.net application in internet information services. How can i do it?
Upvotes: 0
Views: 180
Reputation: 121
<rewrite>
<rules>
<rule name="Redirect domain.com to www" patternSyntax="ECMAScript" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^domain.com$" />
</conditions>
<action type="Redirect" url="http://www.domain.com/{R:0}" />
</rule>
</rules>
Upvotes: 0
Reputation: 1150
In IIS you can set this in the Home Directory" tab by clicking the option "A redirection to a URL".
Upvotes: 2