How to make 301 redirect in .htaccess c substitution part of the URL?

Trying to do a 301 redirect in .htaccess types:{123}-{456}/

{123} - a pre-defined set of characters (only pages containing {123} should redirect)
{456} is any set of characters

With the help of Google and examples can cut out of Url /catalog/, can cut {123}-{456}, but the rest of the Url how to convert I do not know. How to do it?
March 19th 20 at 08:37
1 answer
March 19th 20 at 08:39
RewriteRule ^catalog/(strana)-(gorod)-.*/$ /$1/$2/ [R=301,L]
It works! Thank you) - Harmony.Howe commented on March 19th 20 at 08:42

Find more questions by tags htaccess