Hello. I ask for help, because with .htaccess I am not strong, I can do no more elementary tasks, so I’ll warn you in advance that I’m looking for a ready-made solution or a smart article to solve my problem.
And so, the point is that there is a catalog of products on the site:
URN
/catalog/phone-new /catalog/pc-new /catalog/mouse-new /ctalog/keyboard-new
and so on, there are a lot of them, they all transferred to a new address:
/catalog/phone /catalog/pc /catalog/mouse /ctalog/keyboard And you need to write a 301 redirect, the same situation with goods:
/catalog/phone/iphone /catalog/phone/blackberry /catalog/pc/macbook /catalog/pc/hp /catalog/mouse/razer /catalog/mouse/logitech
need to:
/catalog/iphone /catalog/blackberry /catalog/macbook /catalog/hp /catalog/razer /catalog/logitech
Thank you in advance.
RewriteRule ^catalog/.+/(.+)$ /catalog/$1 [R=301]- splash58