httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Beselin" <ibese...@mailcan.com>
Subject [users@httpd] mod_rewrite url decoding and '?'
Date Mon, 27 Jun 2005 16:45:37 GMT
The files I want to deliver using Apache 1.3.33 contain question marks,
e.g.
     .../htdocs/fund?a12.html
To request this file I can use the URL
     http://www.funds.com/fund%3fa12.html

That is no problem. However if I want to use a rewrite rule to get to
the same file I have a problem.

For example with the following to rewrite underscores to '?' ...
     RewriteRule     (.*)_(.*)     $1?$2
and requesting...
     http://www.funds.com/fund_a12.html
... of course doesn't work, because of the expected handling of the '?'
by mod_rewrite

So the next thing to try would be
     RewriteRule     (.*)_(.*)     $1%3f$2
and again requesting...
     http://www.funds.com/fund_a12.html
This also doesn't work because apache is now looking for the following
file
     .../htdocs/fund%3fa12.html

In other words the URL is not "URL decoded" after passing through
mod_rewrite
     
I see two solution to the problem of using mod_rewrite to get to a file
containing a '?'
a) turn off the mod_rewrite's query string handling (function name is
splitout_queryargs)
b) cause URL decoding to be performed again after mod_rewrite

Any idea how this can be done? Or any other solution to the problem?

---------
Ian Beselin
-- 
  
  ibeselin@mailcan.com

-- 
http://www.fastmail.fm - A fast, anti-spam email service.


---------------------------------------------------------------------
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