Answer the question
In order to leave comments, you need to log in
Redirect from http to https (+ subdomains) and index.php pops up. What is the reason?
Good afternoon dear community.
There was a problem when switching from http to https.
I post the code of the .htaccess file (without br. caching, compression)
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !\?
RewriteCond %{REQUEST_URI} !\&
RewriteCond %{REQUEST_URI} !\=
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_URI} !\/$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteRule ^(.*[^\/])$ /$1/ [R=301,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php?/$0 [PT,L]
RewriteCond %{ENV:HTTPS} !on
RewriteRule ^(.*)$ https://%1/$1 [L,R=301]
Answer the question
In order to leave comments, you need to log in
RewriteCond %{ENV:HTTPS} !on
RewriteRule ^(.*)$ https://%1/$1 [L,R=301]
%1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question