Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

What do I have to do to replace

& = [and]
? = [vop]
. = [too]
= = [rav]

from URI using mod_rewrite?

For example I need to redirect:

"http://www.domain.com/?boo=1" to "http://www.domain.com/[vop]boo[rav]1"
"http://www.domain.com/page?puhovoi=3" to "http://www.domain.com/page[vop]puhovoi[rav]3"
"http://www.domain.com/iphone/iphone.asp?model=3&big=43" to "http://www.domain.com/iphone/iphone[too]asp[vop]model[rav]3[and]big[rav]43"

etc., also directories, query parametres and so on may be absolutely different. Thanks for your help!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

This question was answered in stackoverflow. You can write a similar RewriteRule. The problem is, if you don't know exact order of the replacing character, you'll gona be stuckt. IMHO their is no way to do search and replace with mod_rewrite.

share|improve this answer
    
yeah it's solved with redirecting to php script and parsing query string, but thanks anyway –  purple Aug 20 '10 at 23:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.