Answer the question
In order to leave comments, you need to log in
Correct redirect to https | config or htaccess?
Good afternoon. How to redirect to https correctly? Through site configs or through htaccess? And how right? There are a lot of examples in Google, and everyone is different, and FIG understand how it is correct and / or better. Now redirect through the config:
ServerName site.com
ServerAlias www.site.com
#Redirect / https://site.com
Redirect / https://site.com/
Answer the question
In order to leave comments, you need to log in
We remove
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^www\.(.*) [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question