Skip to content

Instantly share code, notes, and snippets.

@RobertTheGrey
Created May 14, 2012 17:22
Show Gist options
  • Save RobertTheGrey/2695164 to your computer and use it in GitHub Desktop.
Save RobertTheGrey/2695164 to your computer and use it in GitHub Desktop.
IIS rewrite to remove WWW from the URL
<rewrite>
<rules>
<rule name="CanonicalHostNameRule1">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^grandiflora\.co\.za$" negate="true" />
</conditions>
<action type="Redirect" url="http://grandiflora.co.za/{R:1}" />
</rule>
</rules>
</rewrite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment