Skip to content

Instantly share code, notes, and snippets.

@LCHCAPITALHUMAIN
Forked from tkarpinski/web.config
Created October 7, 2016 01:46
Show Gist options
  • Save LCHCAPITALHUMAIN/2cffb158c03dc61644e66b29cb168d42 to your computer and use it in GitHub Desktop.
Save LCHCAPITALHUMAIN/2cffb158c03dc61644e66b29cb168d42 to your computer and use it in GitHub Desktop.
webconfig for http to https redirect
<?xml version="1.0" encoding="UTF-8"?>
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment