You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ian Beselin <ib...@mailcan.com> on 2005/06/27 18:45:37 UTC
[users@httpd] mod_rewrite url decoding and '?'
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
Re: [users@httpd] mod_rewrite url decoding and '?'
Posted by Noah <si...@onastick.net>.
On Mon, Jun 27, 2005 at 06:45:37PM +0200, Ian Beselin wrote:
> 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
Does this help:
http://marc.theaimsgroup.com/?l=apache-httpd-users&m=111109351116230&w=2
--n
--
When the need arises -- and it does -- you must be able to shoot your own
dog. Don't farm it out -- that doesn't make it nicer, it makes it worse.
--Robert A. Heinlein
---------------------------------------------------------------------
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