When forced to use https in .htaccess, the site does not open with the error "ERR_TOO_MANY_REDIRECTS"

Without it, everything is working fine, what's the problem?

RewriteEngine on RewriteBase / RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RewriteRule ^(login|register|reset-password|faq|change-password|logout|holo|about|my-account|contact|submit|check)?$ index.php?a=$1 [L] RewriteRule ^details-(.*)?$ index.php?a=details&id=$1 [L] RewriteRule ^recovery-(.*)?$ index.php?a=recovery&hash=$1 [L] RewriteRule ^refid=(.*)?$ index.php?refid=$1 [L] RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] RewriteRule ^/?(.*) http://%1/$1 [L,R=permanent] 

    1 answer 1

    In addition to the .htaccess file, redirections can occur due to internal CMS settings. Therefore, you also need to check which settings related to the website address are indicated in the configuration files and / or database of your CMS. In addition, if you need to force https forcibly, why in the file you provided, the last rule redirects to http?