Answer the question
In order to leave comments, you need to log in
How to redirect to https in apache?
Guys help me make a normal request so that if a person enters
www.site.ru, site.ru, http://www.site.ru, http://site.ru
always, ALWAYS, all the pages that he entered in this way were redirected to https://site.ru . In the net, some kind of nonsense, then a cyclic redirection, then it only works with one thing.
Answer the question
In order to leave comments, you need to log in
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule .* https://%{HTTP_HOST}/%{REQUEST_URI} [R=301,L,QSA]
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question