Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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>
@tkarpinski
Copy link
Author

tkarpinski commented Jan 16, 2012

install the url rewrite module for IIS and place this in your wwwroot

http://www.iis.net/download/urlrewrite

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