Created
June 17, 2016 17:09
-
-
Save gregjhogan/2ca4b4ea07f83554f899f75aae50fc88 to your computer and use it in GitHub Desktop.
IIS web.config for redirecting HTTP -> HTTPS
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"?> | |
| <configuration> | |
| <system.webServer> | |
| <rewrite> | |
| <rules> | |
| <rule name="redirect HTTP to HTTPS" enabled="true" stopProcessing="true"> | |
| <match url="(.*)" /> | |
| <conditions> | |
| <add input="{HTTPS}" pattern="off" ignoreCase="true" /> | |
| </conditions> | |
| <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" /> | |
| </rule> | |
| </rules> | |
| </rewrite> | |
| </system.webServer> | |
| </configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment