httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Beselin" <>
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,
To request this file I can use the URL

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...
... 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...
This also doesn't work because apache is now looking for the following

In other words the URL is not "URL decoded" after passing through
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
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

-- - A fast, anti-spam email service.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message