Created
April 18, 2015 21:11
-
-
Save macna/e55cefc932a2708d12ab to your computer and use it in GitHub Desktop.
A snippet from a Microsoft Internet Information services web.config file that enables HTTP requests to be redirected to HTTPS. Requires that the rewrite module is installed.
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
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment