How to force https on IIS webiste?

Edit web.config file in your website directory and carefully add this lines (remember to change domain name):

File: web.config

<?xml version="1.0" encoding="UTF-8"?>
                <rule name="Force HTTPS" stopProcessing="true">
                    <match url="^(.*)
quot; /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{HTTPS}" pattern="^OFF
quot; /> </conditions> <action type="Redirect" url="{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> 

Published by

Konrad Fedorczyk

I'm interested in programming and gamedev. I especially luv HTML5 and everything connected to web technologies.

Leave a Reply

Your email address will not be published.