Skip to content

Instantly share code, notes, and snippets.

@MarcStoecker
Created June 20, 2014 11:46
Show Gist options
  • Save MarcStoecker/3ab577ee1801be67656c to your computer and use it in GitHub Desktop.
Save MarcStoecker/3ab577ee1801be67656c to your computer and use it in GitHub Desktop.
<rules>
<rule name="SimpleCanonicalHostNameRule">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.example\.com$" negate="true" />
</conditions>
<action type="Redirect" url="http://www.example.com/{R:1}" redirectType="Permanent" />
</rule>
</rules>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment