Hi,

I "solved" this problem by substituting "%20" with "+" characters. 
Apparently, mod_rewrite doesn't convert "+" to spaces as it does with
"%20".

I say "solved", as this is a hack, and I hate hacks... :(

Is there a list/forum/anything focused on Apache modules or mod_rewrite
in particular?

Thanks,
Otis

--- [EMAIL PROTECTED] wrote:

> Hello,
> 
> I'm using mod_rewrite with httpd 1.3.34 and am having some
> difficulties
> with it when the URL that is getting rewritten has spaces (encoded as
> %20) in it.  Example:
>   http://simpy.com/user/otis/search/foo%20bar
> 
> The error I get is "400 bad Request":
> 
> Bad Request
> Your browser sent a request that this server could not understand.
> The request line contained invalid characters following the protocol
> string.
> 
> My rewrite rule looks like this:
> 
> RewriteRule    ^/user/(.*)/search/(.*)$   
> /simpy/User.do?username=$1&q=$2 [P,NE]
> 
> 
> And what I see in my access_log is:
>   ... "GET /simpy/User.do?username=otis&q=foo bar HTTP/1.1" ...
>                                           ^^^^^^^
> 
> The problem seems to be that space in "foo bar".
> I believe I need to tell httpd/rewrite module _not_ to decode the %20
> from the original URL.
> 
> Does anyone know how I could configure mod_rewrite so that the %20
> gets
> preserved instead of converted to spaces?
> 
> Any help would be greatly appreciated.  I just discovered this
> problem
> on Simpy.com production site.
> 
> Thanks,
> Otis
> 
> ---------------------------------------------------------------------
> 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: [EMAIL PROTECTED]
>    "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to