Daily Archives: December 8, 2015

Redirect non https urls to https with www

How to force HTTPS using a web.config file This example shows how to Redirect example.com and www.example.com to https://www.example.com You need to add this rules to your web.config file <?xml version=”1.0″ encoding=”UTF-8″?> <configuration> <system.webServer> <rewrite> <rules> <rule name=”CanonicalHostNameRule1″ stopProcessing=”true”> <match url=”(.*)” /> <conditions> <add input=”{HTTP_HOST}” pattern=”^www\.example\.com$” negate=”true” /> </conditions> <action type=”Redirect” url=”https://www.example.com/{R:1}” /> </rule> <rule …

Read more