Answer the question
In order to leave comments, you need to log in
How to make a regular expression for 301 redirects?
The bottom line is this:
there are pages like site.ru/catalog/name-1/category
where name-1 is a variable, i.e. category name
by 301 redirect and using regular expressions, you need to redirect the page to
site.ru/catalog/name-1/
i.e. in other words, "remove" the category at the end of the url.
Answer the question
In order to leave comments, you need to log in
Something like this
True, this is for Nginx, I do not know what kind of web server you have.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question