Last active
August 29, 2015 14:04
-
-
Save shengoo/f701ab81410f82795e58 to your computer and use it in GitHub Desktop.
iis rewrite
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="Add www" patternSyntax="Wildcard" stopProcessing="true"> | |
<match url="*" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="test.com" /> | |
</conditions> | |
<action type="Redirect" url="http://www.test.com/{R:0}" /> | |
</rule>--> | |
<rule name="Add www" patternSyntax="ECMAScript" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="^test.com$" /> | |
</conditions> | |
<action type="Redirect" url="http://www.test.com/{R:0}" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment