Answer the question
In order to leave comments, you need to log in
How to redirect from http to https in wordpress?
Good afternoon!
The site is hosted by ukraine.com.ua and a free ssl certificate Let's Encrypt
is connected. When "Redirect requests from http to https" is enabled, I get the error "ERR_TOO_MANY_REDIRECTS" because there is always a redirect from http to https and back.
I tried adding a redirect to htaccess with:
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question