Quantcast
Channel: URL Rewrite Module
Viewing all articles
Browse latest Browse all 2482

https to https canonical

$
0
0

I've setup a rule to carry out both canonical and SSL redirects, this works fine however I need this to also work on SSL requests.

If I enter http://www.mywebsite.com it redirects tohttps://www.mywebsite.co.uk 

However if I enter https://www.mywebsite.com no redirect happens?

Current rule:

<rule name="CanonicalHostAndSSLRedirect" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAny" trackAllCaptures="false"><add input="{HTTP_HOST}" pattern="^www\.mywebsite\.co\.uk$" negate="true" /><add input="{HTTPS}" pattern="^OFF$" /> </conditions> <action type="Redirect" url="https://www.mywebsite.co.uk/{R:1}" redirectType="Permanent" /> </rule> 


Thanks,

Mike


Viewing all articles
Browse latest Browse all 2482

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>