Answer the question
In order to leave comments, you need to log in
How to make a 301 redirect in .htaccess with the substitution of a part of the URL?
I'm trying to make a 301 redirect in .htaccess like this:
https://example.ru/catalog/strana-gorod-{123}-{456}/
->
https://example.ru/strana/gorod/
Where:
{123} - a certain predefined character set (only pages containing {123} should be redirected)
{456} - any character set
With the help of google and examples, I can cut /catalog/ from the URL, I can cut {123}-{456}, but the rest I don’t know how to convert part of the URL. How to do it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question