Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <rewrite>
- <rules>
- <rule name="HTTP to HTTPS redirect" stopProcessing="true">
- <match url="(.*)" />
- <conditions>
- <add input="{HTTPS}" pattern="off" />
- </conditions>
- <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
- </rule>
- </rules>
- </rewrite>
- <add input="{HTTPS}" pattern="on" />
- <add input="{HTTPS}" pattern="off" />
- <rewrite>
- <rules>
- <rule name="HTTPS Rule behind AWS Elastic Load Balancer Rule" 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>
Add Comment
Please, Sign In to add comment