Answer the question
In order to leave comments, you need to log in
What directive should be specified in .htaccess to redirect from one section of the site to another?
Good afternoon.
Please tell me what directive to register in .htaccess so that the visitor, getting to one section of the site, is automatically redirected to another. In my case, from the mobile version of the site to the standard one:
From all pages containing
sitename.ru/m/
to the pages
sitename.ru/catalog/
, that is, to change "m" to "catalog".
Thank you!
Answer the question
In order to leave comments, you need to log in
I asked myself, and I will answer! :))
Pretty simple:
RewriteRule ^ m (/.*|)$ catalog $1 [L,NC,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question