httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vern Hart <>
Subject backreferences aren't being expanded for internal RewriteMaps
Date Sat, 03 Feb 2001 00:43:28 GMT
I just upgraded from 1.3.12 to 1.3.17 and am having trouble using
backreferences that used to work:

    RewriteMap lowercase int:tolower
    RewriteCond ${lowercase:%{SERVER_NAME}} ^(www\.)?(.+)$
    RewriteCond %{DOCUMENT_ROOT}/%2         -d
    RewriteRule ^/(.*)$                     %{DOCUMENT_ROOT}/%2/$1

The "%2" is being replaced with "${}"
instead of "".

I searched the bugs list and found one that looked very similar
(PR6671) so I tried the test case mentioned:

    RewriteMap test int:toupper
    RewriteRule (.*)        ${test:$1}

And that fails as well.

Here's what my rewrite log says (eliminating date etc.):

    [rid#83c3c84/initial] (2) init rewrite engine with requested uri /foo
    [rid#83c3c84/initial] (3) applying pattern '(.*)' to uri '/foo'
    [rid#83c3c84/initial] (2) rewrite /foo -> ${test:/foo}
    [rid#83c3c84/initial] (2) local path result: ${test:/foo}

So, instead of changing "/foo" to "/FOO" it changes it to

The bug report PR6671 says the problem was fixed in October on
1.3.14.  Looking at mod_rewrite.c, the source has changed a little
since then so I can't tell, with a quick glance, what the
functionality of the changes is.  The patch is in

Can I get a sanity check?  Can someone verify this is a problem with
their 1.3.17?


View raw message