Answer the question
In order to leave comments, you need to log in
How to set up a 301 redirect from www to non-www?
Good afternoon!
I read a lot of articles but could not set up the correct redirect from www to without www, tell me how to do it.
Registered in .htaccess:
RewriteCond %{HTTP_HOST} ^www.site_name\.ru$ [NC]
RewriteRule ^(.*)$ http://site_name.ru/$1 [R=301,L]
Answer the question
In order to leave comments, you need to log in
I made a gluing for the client according to this guide, the subsequent feedback confirmed the correctness of the methodology.
.htaccess is read from top to bottom, moreover, in a circle until the generation of urls stops completely.
Therefore, the location of the directive matters.
All .htaccess to studio
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question