Answer the question
In order to leave comments, you need to log in
How to make .htaccess redirect with removing part of url in one rule?
The question is the following: there
was a site with a complex structure, etc. we are transferring it to a new engine, but we decided not to bother with the catalog.
I wanted to transfer the url through htaccess, but ....
the task is to have old links like:
site.ru/catalog/auto/id-tovarka/
site.ru/auto/tovarka/
site.ru/catalog/auto/
Answer the question
In order to leave comments, you need to log in
the question is removed, it is decided by the introduction of the rule:
RewriteRule (.*)/(.*)/id-(.*) https://site.ru/$2/$3? [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question