Skip to content

Instantly share code, notes, and snippets.

@onesmartguy
Created December 24, 2015 02:38
Show Gist options
  • Save onesmartguy/5eae65ce25b961b9bb19 to your computer and use it in GitHub Desktop.
Save onesmartguy/5eae65ce25b961b9bb19 to your computer and use it in GitHub Desktop.
web.config https rewrite rule
<!-- Redirect all traffic to SSL -->
<rule name="Force HTTPS" enabled="true">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment