Guest User

Untitled

a guest
Dec 13th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <rewrite>
  2. <rules>
  3. <rule name="HTTP to HTTPS redirect" stopProcessing="true">
  4. <match url="(.*)" />
  5. <conditions>
  6. <add input="{HTTPS}" pattern="off" />
  7. </conditions>
  8. <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
  9. </rule>
  10. </rules>
  11. </rewrite>
  12.  
  13. <add input="{HTTPS}" pattern="on" />
  14.  
  15. <add input="{HTTPS}" pattern="off" />
  16.  
  17. <rewrite>
  18. <rules>
  19. <rule name="HTTPS Rule behind AWS Elastic Load Balancer Rule" stopProcessing="true">
  20. <match url="^(.*)$" ignoreCase="false" />
  21. <conditions>
  22. <add input="{HTTP_X_FORWARDED_PROTO}" pattern="^http$" ignoreCase="false" />
  23. </conditions>
  24. <action type="Redirect" url="https://{SERVER_NAME}{URL}" redirectType="Found" />
  25. </rule>
  26. </rules>
  27. </rewrite>
Add Comment
Please, Sign In to add comment