Skip to content

Instantly share code, notes, and snippets.

@jacobhackl
Created March 28, 2017 18:51
Show Gist options
  • Save jacobhackl/678fb32a99029cdb7d4816ed5784f10f to your computer and use it in GitHub Desktop.
Save jacobhackl/678fb32a99029cdb7d4816ed5784f10f to your computer and use it in GitHub Desktop.
Force https for iis rewrite and aws LB
<rule name="Force Https" stopProcessing="true">
<match url="health.htm" negate="true" />
<conditions>
<add input="{HTTP_X_FORWARDED_PROTO}" pattern="https" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
</rule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment