Redirect to HTTPS - Web.config

Redirect to HTTPS - Web.config

code snippet

web.config
<system.webServer>
        <rewrite>
            <rules>
                <remove name="Redirect to https" />
                <rule name="Redirect to https" stopProcessing="true">
                    <match url=".*" />
                    <conditions>
                        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
			<add input="{HTTP_HOST}" pattern="^www.yourdomain.com.au$" />
			<add input="{HTTP_HOST}" pattern="^yourdomain.com.au$" />
                    </conditions>
                    <action type="Redirect" url="https://www.yourdomain.com.au/{R:0}" />
                </rule>
        </rewrite>
</system.webServer>

"It is never too late to be what you might have been"

Contact me!

Have questions? Feel free to use the form or send me an email with any questions.

I will be responsive to your requests and your questions.