httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clodoaldo Pinto Neto <clodoaldo.pinto.n...@gmail.com>
Subject [users@httpd] Query string encoding
Date Fri, 03 Apr 2009 15:52:57 GMT
I want to rewrite a url to a query string like this:

from http://example.com/x+ to http://example.com/var=x%2B
or
from http://example.com/x%2B to http://example.com/var=x%2B

Using:
RewriteRule ^(/([\w-()+]+))?/$ /?var=$2 [QSA]

The problem i have is that the query string is passed to the
application unencoded so the "+" is understood by the application as
space. How to reencode the query string before it is passed to the
application?

Rewrite log:
10.1.1.110 - - [03/Apr/2009:12:22:46 --0300]
[example.com/sid#7fa25fb33bf0][rid#7fa25c0ea338/initial] (3) applying
pattern '^(/([\w-()+]+))?/$' to uri '/x+/'
10.1.1.110 - - [03/Apr/2009:12:22:46 --0300]
[example.com/sid#7fa25fb33bf0][rid#7fa25c0ea338/initial] (2) rewrite
'/x+/' -> '/?var=x+'

Regards, Clodoaldo

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message