Skip to content

Instantly share code, notes, and snippets.

@vbfox
Created March 30, 2016 21:23
Show Gist options
  • Save vbfox/03b1992dc1c3cc8746dd726c87ea9467 to your computer and use it in GitHub Desktop.
Save vbfox/03b1992dc1c3cc8746dd726c87ea9467 to your computer and use it in GitHub Desktop.
Suave IIS https with redir
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="httpplatformhandler" />
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform
stdoutLogEnabled="true"
stdoutLogFile="./logs/SuaveIIS.log"
startupTimeLimit="20"
processPath="./SuaveIIS.exe"
arguments=""
requestTimeout="00:05:00">
</httpPlatform>
<rewrite>
<rules>
<rule name="HTTP to HTTPS" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment