Redirect part of the URL?

Hello!

The site has changed the engine, changed the some URLs. Hence the question: how to change part of the url correctly?
You need to change /tag/word1 word2 on search/?q=word1 word2
This problem does not occur if the url is only one word between words by a space.
Thanks in advance!
June 27th 19 at 15:21
1 answer
June 27th 19 at 15:23
(/tag/word1 )(word2) to search/\?q=$1$2

bkady the buck - a brace from the top, the room bucks room brackets
And what does the bracket on top and number of brackets? - nikita.Stracke commented on June 27th 19 at 15:26
Mmm I think and know
bracket at what you sorry it took.
Well, if you can count the Number of parentheses is substituted into a variable
The room is physically first second third - Lavern_Schuppe commented on June 27th 19 at 15:29
If not difficult, write a live example, it is difficult to understand, honestly.
Thank you! - nikita.Stracke commented on June 27th 19 at 15:32
RewriteRule ^/tag/(word1 word2)$ /search/\?q=$1 [L,R=301]
- Lavern_Schuppe commented on June 27th 19 at 15:35
Not working out with one word or with several( - nikita.Stracke commented on June 27th 19 at 15:38
Sorry, one word worked, with several way :( - nikita.Stracke commented on June 27th 19 at 15:41
and between them a space ? - Lavern_Schuppe commented on June 27th 19 at 15:44
Yes, a space. Perhaps the problem is that this Cyrillic words? - nikita.Stracke commented on June 27th 19 at 15:47
and this is also in the space, too, and quotes not ride ? - Lavern_Schuppe commented on June 27th 19 at 15:50
RewriteRule ^/tag/("Word1 word2")$ /search/\?q=$1 [L,R=301]

So didn't work - nikita.Stracke commented on June 27th 19 at 15:53
100% blank and Russian letters. - Lavern_Schuppe commented on June 27th 19 at 15:56
Thank you very much for the help! Will leave as is. - nikita.Stracke commented on June 27th 19 at 15:59

Find more questions by tags Processing URL