Created
February 28, 2019 20:33
-
-
Save bdukes/77103455ba8c61d2fb165a98f47004ad to your computer and use it in GitHub Desktop.
URL Rewrite rule to redirect from HTTP to HTTPS
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="Redirect HTTP to HTTPS" stopProcessing="true"> | |
<match url="(.*)"/> | |
<conditions> | |
<add input="{HTTPS}" pattern="^OFF$"/> | |
</conditions> | |
<action type="Redirect" url="https://{HTTP_HOST}/{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