Created
May 12, 2011 11:34
-
-
Save augustoproiete/968347 to your computer and use it in GitHub Desktop.
Redirect www to Non-www using URL Rewrite Module 2.0
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="RedirectWwwToNonWww"> | |
<match url="(.*)" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="^yourwebsite\.com$" negate="true" /> | |
</conditions> | |
<action type="Redirect" url="http://yourwebsite.com/{R:1}" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment