How Can We Help?
< All Topics
You are here:
Print

IIS URL Rewrite – http to https

web.config

...
   <system.webServer>
       <rewrite>
           <rules>
               <rule name="http to https" stopProcessing="true">
                   <match url="(.*)" />
                   <conditions>
                       <add input="{HTTPS}" pattern="^OFF$" />
                   </conditions>
                   <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
               </rule>
           </rules>
       </rewrite>
   </system.webServer>
...
Table of Contents