L
L
lexstile2020-03-03 11:04:11
htaccess
lexstile, 2020-03-03 11:04:11

How to strip part of url?

There are urls like:
site.ru/produktsiya/manufacturer/site
site.ru/produktsiya/naruzhnaya-reklama/manufacturer/site
........................ ................
How to strip "manufacturer/site" from similar urls?
So that the links are of the form:
site.ru/produktsiya/
site.ru/produktsiya/naruzhnaya-reklama/

Thank you in advance for your answers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-03-03
@lexstile

RewriteRule ^(.+)/manufacturer/(.+)$  /&1/$2 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question