Answer the question
In order to leave comments, you need to log in
How to redirect HTTP to HTTPS under the following conditions?
Good evening.
I apologize in advance for a possibly strange question that requires googling, but I've been rereading it for a long time, but it's still not clear.
There is an altorouter library (altorouter.com) which uses the following .htaccess:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
Answer the question
In order to leave comments, you need to log in
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question