P
P
PaulStranger2014-08-29 10:48:24
htaccess
PaulStranger, 2014-08-29 10:48:24

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

1 answer(s)
P
PaulStranger, 2014-08-29
@PaulStranger

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 question

Ask a Question

731 491 924 answers to any question