T
T
Tony Green2017-02-12 10:25:27
Regular Expressions
Tony Green, 2017-02-12 10:25:27

How to correctly implement a mass redirect of the pages of the old blog to the new one?

Essence:
I want to make a 301 redirect from old => to a new kind of links.
Example:
site.ru/kuhni/285-yarkayakuhnya.html => site.ru/yarkayakuhnya
domain/directory/<three-digits>-<what you need to take>.html => domain/<what you need to take>
As I understand it, you will have to use regular expressions and bring it to a general form.
How to correctly implement this in htaccess?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
roswell, 2017-02-12
@GreeNYA

RewriteEngine On
RewriteRule \/\d+-(.+)\.html$ /$1 [NC,R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question