Created
July 15, 2013 19:28
-
-
Save nickspiers/6002677 to your computer and use it in GitHub Desktop.
IIS Rewrite remove WWW rule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Remove WWW" stopProcessing="true"> | |
<match url="^(.*)$" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" /> | |
</conditions> | |
<action type="Redirect" url="http://{C:2}{PATH_INFO}" redirectType="Permanent" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment