Skip to content

Instantly share code, notes, and snippets.

@aronbudinszky
Created January 9, 2014 19:34
Show Gist options
  • Save aronbudinszky/8340442 to your computer and use it in GitHub Desktop.
Save aronbudinszky/8340442 to your computer and use it in GitHub Desktop.
Open up web.config and add the following just before the closing system.webServer to force HTTPS in beautiful IIS.
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment