Answer the question
In order to leave comments, you need to log in
How to configure htacces to redirect to the non-www version?
Good afternoon.
The problem is that for pages like www.site.ru/ggg.html the redirect goes to site.ru/ggg.html as it should be,
but from pages like www.site.ru/catalog/ggg.html the redirect does not work, that is, you type www.site.ru/catalog/ggg.html and it does not remove www.
How to solve this problem?
And also recommend what to read on htacces ..
The following is written in htacces
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$
RewriteRule ^(.*)$ http://%1/$1 [L,R=301]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question