Answer the question
In order to leave comments, you need to log in
How to make a redirect from the entire section to a new section?
How to make a redirect from the entire section, for example site.ru/catalog/plyazh/...
to redirect site.ru/plyazh/... .
inside there is also a structure of sections and pages.
Answer the question
In order to leave comments, you need to log in
Redirects all contents of the directories http://site.ru/dir1/any/any → to site.ru dir2 /any/any .
RewriteCond %{REQUEST_URI} ^/dir1/(.*)$
# если строка начинается с /dir1/
RewriteRule ^(.*)$ /dir1%1 [R=301,L]
RewriteCond %{REQUEST_URI} ^(.*)/dir1/(.*)$
# если строка содержит /dir1/
RewriteRule ^(.*)$ %1/dir2/%2 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question