Created
January 16, 2012 14:43
-
-
Save tkarpinski/1621178 to your computer and use it in GitHub Desktop.
webconfig for http to https redirect
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="HTTP to HTTPS redirect" stopProcessing="true"> | |
<match url="(.*)" /> | |
<conditions> | |
<add input="{HTTPS}" pattern="off" ignoreCase="true" /> | |
</conditions> | |
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{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
install the url rewrite module for IIS and place this in your wwwroot
http://www.iis.net/download/urlrewrite