jeudi 25 mai 2017

Redirect to https://www.example.com

Currently I'm using http://example.com but I want redirect all to https://www.example.com

I read several topics here and tried quite a few solutions to this but nothing worked for me.

My last try was this:

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

When I'm using this code I can see this: enter image description here

But it gives me this message also:

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.

Can you help me with this?




Aucun commentaire:

Enregistrer un commentaire