Skip to content

Instantly share code, notes, and snippets.

@5iDS
Created September 18, 2013 02:51
Show Gist options
  • Save 5iDS/6603870 to your computer and use it in GitHub Desktop.
Save 5iDS/6603870 to your computer and use it in GitHub Desktop.
IIS REWRITE NON-WWW TO WWW
<rewrite>
<rules>
<rule name="Redirect domain.com to www" patternSyntax="Wildcard" 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>
</rewrite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment