Skip to content

Instantly share code, notes, and snippets.

@amirkhan81
Created March 1, 2018 17:12
Show Gist options
  • Save amirkhan81/b68419aec45e47896d624a6bbe4631d8 to your computer and use it in GitHub Desktop.
Save amirkhan81/b68419aec45e47896d624a6bbe4631d8 to your computer and use it in GitHub Desktop.
<rules>
<rule name="Remove www" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^www\.(.+)$" />
</conditions>
<action type="Redirect" url="http://{C:1}/{R:0}" appendQueryString="true" redirectType="Permanent" />
</rule>
</rules>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment