Skip to content

Instantly share code, notes, and snippets.

@matthewrwilton
Created June 28, 2016 13:21
Show Gist options
  • Save matthewrwilton/f4a7b0f3a68ec39a492c3a29aaeae17e to your computer and use it in GitHub Desktop.
Save matthewrwilton/f4a7b0f3a68ec39a492c3a29aaeae17e to your computer and use it in GitHub Desktop.
Elastic Load Balancer IIS HTTP to HTTPs Redirect
<rule name="HTTP to HTTPs Redirect" stopProcessing="true">
<match url="(.*)"/>
<conditions>
<add input="{HEADER_X-Forwarded-Proto}" pattern="https" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent"/>
</rule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment