Answer the question
In order to leave comments, you need to log in
How to redirect to an address that includes the parent category only if it doesn't exist?
I set up redirection via .htaccess mod_rewrite from one CMS to a new one.
On the old site, some URLs look like:
https://site.ru/subcategory/tovar-artikul-1
This whole thing needs to be redirected to
https://site.ru/parent-category/subcategory/tovar-artikul-1
https://site.ru/parent-category/subcategory
. 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