You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Henrik Johansson <He...@itm.mh.se> on 2001/01/30 18:04:54 UTC
mod_rewrite/7157: RewriteMap doesn't work
>Number: 7157
>Category: mod_rewrite
>Synopsis: RewriteMap doesn't work
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Tue Jan 30 09:10:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Henrik.Johansson@itm.mh.se
>Release: 1.3.17
>Organization:
apache
>Environment:
Solaris7 on sparc
gcc2.95.2
>Description:
When trying to use a RewriteMap-rule we get a "Couldn't connect to server"
In apache1.3.14 we had the problem that $1 wasn't expanded.
Now the problem seems to be that RewriteMap doesn't search the users-file.
The same ruleset as we try to use in 1.3.17 works fine in 1.3.12
mod_rewrite & mod_proxy is enabled
--output from rewritelog--
10.55.21.7 - - [30/Jan/2001:17:43:54 +0100] [www0/sid#1dce48][rid#230e
a0/initial] (3) applying pattern '^/~([a-z]+)(\/?)(.*)' to uri '/~henjoh/'
10.55.21.7 - - [30/Jan/2001:17:43:54 +0100] [www0/sid#1dce48][rid#230e
a0/initial] (2) rewrite /~henjoh/ -> http://${users:henjoh|wwwosd2}/~henjoh/
10.55.21.7 - - [30/Jan/2001:17:43:54 +0100] [www0/sid#1dce48][rid#230e
a0/initial] (2) explicitly forcing redirect with http://${users:henjoh|server0}/~henjoh/
10.55.21.7 - - [30/Jan/2001:17:43:54 +0100] [www0/sid#1dce48][rid#230e
a0/initial] (1) escaping http://${users:henjoh|server0}/~henjoh/ for r
edirect
10.55.21.7 - - [30/Jan/2001:17:43:54 +0100] [www0/sid#1dce48][rid#230e
a0/initial] (1) redirect to http://${users:henjoh|server0}/~henjoh/ [R
EDIRECT/302]
>How-To-Repeat:
httpd.conf:
ServerName www0
RewriteEngine on
RewriteLog /tmp/rewritelog
RewriteLogLevel 9
RewriteMap users txt:/path/to/users.txt
RewriteRule ^/~([a-z]+)(\/?)(.*) http://${users:$1|server0}/~$1/$3 [R]
</VirtualHost>
users.txt:
henjoh server2
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]