Created
September 29, 2016 15:37
-
-
Save alindgren/4da5332f1b0ddb27d2ced1015eba4847 to your computer and use it in GitHub Desktop.
Canonical Domain Redirect
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="CanonicalHostNameRule1"> | |
<match url="(.*)" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="^www\.domain\.com$" negate="true" /> | |
</conditions> | |
<action type="Redirect" url="http://www.domain.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