I am using .htaccess
. I am trying to redirect http://www.example.co.uk
AND http://example.co.uk
to the secure https. I have searched on this site and tried all the suggestions, but none work. I have approached my hosting company and they have tried with no joy.
One example I used is -
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^example\.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.co.uk$
RewriteRule ^(.*)$ https://www.example.co.uk/$1 [R,L]
Another example code I use is -
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ https://zapstudio.co.uk%{REQUEST_URI} [L,NE,R=301]
The error comes up as follows on Firefox:
The page isn’t redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept cookies.
There is no other coding in my .htaccess file than the code inserted. Please, can anyone shed any light on this.