Created
November 13, 2015 03:28
-
-
Save robert-claypool/75995b20bd23280dbd27 to your computer and use it in GitHub Desktop.
IIS configuration for HTTP to HTTPS redirects behind an AWS Electric Load Balancer; IIS URL Rewrite must be installed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="HTTPS rewrite behind AWS Electric Load Balancer rule" enabled="true" stopProcessing="true"> | |
<match url="^(.*)$" ignoreCase="false" /> | |
<conditions> | |
<add input="{HTTP_X_FORWARDED_PROTO}" pattern="^http$" ignoreCase="false" /> | |
</conditions> | |
<action type="Redirect" url="https://{SERVER_NAME}{URL}" redirectType="Found" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See http://www.emind.co/how-to/how-to-force-https-behind-aws-elb