Skip to content

Instantly share code, notes, and snippets.

@oledid
Created June 19, 2015 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oledid/349ed1ba307a72fe02d2 to your computer and use it in GitHub Desktop.
Save oledid/349ed1ba307a72fe02d2 to your computer and use it in GitHub Desktop.
IIS Redirect HTTP to HTTPS
<?xml version="1.0"?>
<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>
@oledid
Copy link
Author

oledid commented Sep 6, 2017

Requires the URL Rewrite module to be installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment