For some time, years, I’ve used the following HT Access code to route all calls to the https://www. version of a site. (Changing the domain accordingly of course).
RewriteOptions inherit
RewriteEngine on
RewriteCond %{HTTP_HOST} ^handtherapyservicesni.co.uk [NC]
RewriteRule ^(.*)$ https://www.handtherapyservicesni.co.uk/$1 [L,R=301,NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.handtherapyservicesni.co.uk/$1 [R,L]
RewriteEngine on
ErrorDocument 404 https://www.handtherapyservicesni.co.uk/
I’ve just added it to a new site, and it’s breaking. Safari is returning an error page with a “too many redirects” message. But as I say, I’ve used this for years and it’s fine. And looking at it, I can see no errors.
It’s live tight now on site here: https://www.handtherapyservicesni.co.uk
If I remove the code from the HT Access doc the full URL, with the https and the www bit works fine. So it’s not an SSL issue, it just seems to be an issue with the code. But what?
Thanks.