httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45529] B flag in mod_rewrite RewriteRule doesn't escape & and other sim characters
Date Wed, 17 Sep 2008 10:29:33 GMT

--- Comment #6 from Samuel Williams <>  2008-09-17
03:29:33 PST ---
I've solved this for my very specific case:

        RewriteEngine on
        RewriteCond %{THE_REQUEST} ^.*?\/(.*\.git)\/web\/(.*)\s+HTTP.*$
        RewriteRule ^.*$ /git.rhtml?r=%1&p=%2 [L]

What I expected to be able to write is:

        RewriteEngine on
        RewriteRule ^(.*\.git)\/web\/(.*)$ /git.rhtml?r=$1&p=$2 [B]

But this doesn't seem to work. I've noticed that when requesting

It is logged as: - - [17/Sep/2008:22:22:47 +1200]
[][rid#b83cf178/initial] (2) init rewrite
engine with requested uri

"C++" is not escaped as "C%2B%2B" as it is passed from the original query. I'm
not sure how Apache is handling this internally, but I would have expected to

init rewrite engine with requested uri

i.e. something before mod_rewrite is un-escaping the URL before it gets to
mod-rewrite. This might be why the [B] flag appears to have no effect.

Kind regards,

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message