jasonbin

IIS URLRewrite HTTP to HTTPS

Dec 20th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3.   <system.webServer>
  4.     <rewrite>
  5.       <rules>
  6.         <rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
  7.         <match url="(.*)" />
  8.         <conditions logicalGrouping="MatchAny">
  9.           <add input="{HTTPS}" pattern="off" />
  10.         </conditions>
  11.         <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
  12.         </rule>
  13.       </rules>
  14.     </rewrite>
  15.   </system.webServer>
  16. </configuration>
Advertisement
Add Comment
Please, Sign In to add comment