L
L
Leonardo-lavanda2019-08-19 16:25:51
Regular Expressions
Leonardo-lavanda, 2019-08-19 16:25:51

How to set up httacces (regulars)?

how to redirect from /catalog/ to /drugoy-catalog/ but
from /catalog/123 to /catalog/222
so that the first redirect does not interrupt the other

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-08-19
@Leonardo-lavanda

RedirectMatch 301 ^/catalog/$    /drugoy-catalog/
RedirectMatch 301 ^/catalog/123$ /catalog/222

Or
RewriteRule ^catalog/$ /drugoy-catalog/ [R=301,L]
RewriteRule ^catalog/123$ /catalog/222 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question