V
V
v3542017-09-06 07:47:20
Regular Expressions
v354, 2017-09-06 07:47:20

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

1 answer(s)
V
Vladimir Mukovoz, 2017-09-30
@v354

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 question

Ask a Question

731 491 924 answers to any question