M
M
Maxim Narizhniy2016-12-31 00:48:30
Nginx
Maxim Narizhniy, 2016-12-31 00:48:30

How to make a redirect using a regular expression?

hello everyone, help me to make redirects through regular expressions, there are more than a thousand pages on the site that are not needed, but have already been indexed, and they need to be redirected to others
, here are a few examples:
/zamena-gofry-kia-v-zelao-750/ > / zamena-gofry-kia-v-sao-750/
/pokraska-dveri-saab-v-zelao-750/ > /pokraska-dveri-saab-v-sao-750/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
akzhan, 2016-12-31
@akzhan

rewrite ^(.+)-zelao-(\d+)$ $1-sao-$2;
perldoc.perl.org/perlre.html for help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question