I have installed an SSL certificate to my website bestlife.epizy.com
I have added
Destination
CNAME Record
Private Key
Certificate
I did all steps but still, my site doesn’t redirect to HTTPS although added the
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:CF-Visitor} !{“scheme”:“https”}
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
to htaccess file
But still, the site redirects to HTTP is there any step to resolve this matter, please?
SSL is working for me:
Try this for the htaccess code:
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Source: https://tinkertechlab.com/webhosting/htaccess/force-traffic-to-https
4 Likes
Instead of
You can also try this
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https [OR]
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP:CF-Visitor} !{“scheme”:“https”}
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
1 Like
I checked your account and I see the file name is incorrect.
The name of the file must be .htaccess
. That’s with a dot at the start. If you omit the dot, the file won’t be used.
2 Likes
You’re right Admin, I deleted the dot, I thought it plus
It worked now, thank you very much
1 Like
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.