Created
August 31, 2017 14:40
-
-
Save vgerbase/59b7cc3b5dccfb55fe85a0d73bf2f881 to your computer and use it in GitHub Desktop.
Ensure WWW in IIS. Require URL Rewrite module.
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
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Ensure WWW" patternSyntax="Wildcard" stopProcessing="true"> | |
<match url="*" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="www.mydomain.com" negate="true" /> | |
</conditions> | |
<action type="Redirect" url="http://www.mydomain.com/{R:1}" 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