mod_rewrite and % character
- by pekrimen
I need to rewrite a URL that contains one or more strings of characters incling a % character (for instance %123) into another string of characters including a % character (for instance %234).
I am able to do this using the special THE_REQUEST attribute with something like this:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)\%123(.*)\ HTTP
RewriteRule .* /%1\%234%2 [R,NE]
However, this does not work for URLs that contain more than one "%123" strings... The N option has no efect as it seems that the value of THE_REQUEST is not changed.
Any ideas?