|
Home > Archive > Apache Server configuration support > May 2007 > mod_rewrite unescaping values
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
mod_rewrite unescaping values
|
|
|
|
| Jon Slaughter 2007-05-10, 1:32 pm |
|
"sleek" <cslush@gmail.com> wrote in message
news:1178803314.738994.18620@e51g2000hsg.googlegroups.com...
>I have a rewrite rule:
>
> RewriteRule ^search/(.*)$ search.php?q=$1
>
> However, if i request http://server/search/ben%26jerry , it doesn't
> return http://server/search.php?q=ben%26jerry, but rather
> http://server/search.php?q=ben&jerry
>
> Can anyone please help me to solve this problem?
>
I believe there is a flag for this,
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
'noescape|NE' (no URI escaping of output)
This flag keeps mod_rewrite from applying the usual URI escaping rules to
the result of a rewrite. Ordinarily, special characters (such as '%', '$',
';', and so on) will be escaped into their hexcode equivalents ('%25',
'%24', and '%3B', respectively); this flag prevents this from being done.
This allows percent symbols to appear in the output, as in
Jon
|
|
|
|
|