Received: (qmail 17310 invoked by uid 501); 23 Feb 2001 15:25:55 -0000 Message-Id: <20010223152555.17309.qmail@apache.org> Date: 23 Feb 2001 15:25:55 -0000 From: Tim Bishop Reply-To: tim@easily.co.uk To: submit@bugz.apache.org Subject: Apache 1.3.14, 1.3.17 mod_rewrite problems X-Send-Pr-Version: 3.110 >Number: 7302 >Category: mod_rewrite >Synopsis: Apache 1.3.14, 1.3.17 mod_rewrite problems >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: duplicate >Submitter-Id: apache >Arrival-Date: Fri Feb 23 07:30:00 PST 2001 >Closed-Date: >Last-Modified: Fri Feb 23 17:04:54 PST 2001 >Originator: tim@easily.co.uk >Release: 1.3.14, 1.3.17 >Organization: >Environment: Microsoft Windows 98 4.10.2222 A apache_1.3.17-win32-src.msi >Description: Recently I have tried to upgarde my windows apache server to 1.3.14 and subsequently 1.3.17 - both I have had to reject due to (different) mod_rewrite problems Problems from rewrite.log: Apache 1.3.14 10.1.230.32 - - [20/Feb/2001:12:40:48 +0000] [redirect3.com/sid#65628c][rid#70b390/initial] (5) map lookup OK: map=lowercase key=%{HTTP_HOST -> val=%{http_host as you can see the variable %{HTTP_HOST} is not being translated (I guess it's because it's matching the first { with the first } and not it's matching one) Apache 1.3.17 10.1.230.32 - - [23/Feb/2001:15:14:42 +0000] [homer/sid#65628c][rid#700338/initial] (4) RewriteCond: input='${lowercase:homer}' pattern='^(www\.)?(.*)$' => matched as you can see the map lookup is not being detected This works nicely under Apache 1.3.9... What's gone wrong? >How-To-Repeat: Turn on mod_rewrite and add the following httpd.conf snippet: # turn on the rewrite engine RewriteEngine on # set path for log file RewriteLog logs/rewrite.log # set level of logging 0=none 9=max RewriteLogLevel 9 RewriteMap lowercase int:tolower RewriteMap easyweb txt:web-forwarding.conf # define maps # convert server name to lowercase RewriteCond ${lowercase:%{HTTP_HOST}} ^(www\.)?(.*)$ # lookup server name in web forwarding file RewriteCond ${webforward:%2} ^(.+)$ # if its there then redirect to new url RewriteRule ^/(.*)$ %1$1 [R,L] >Fix: I haven't a clue! >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: slive State-Changed-When: Fri Feb 23 14:30:43 PST 2001 State-Changed-Why: [This is a standard response.] This issue has been reported before; please search the FAQ and the bug database. Thanks for using Apache! Class-Changed-From-To: sw-bug-duplicate Class-Changed-By: slive Class-Changed-When: Fri Feb 23 14:30:43 PST 2001 Comment-Added-By: wrowe Comment-Added-When: Fri Feb 23 17:04:54 PST 2001 Comment-Added: User further reports (on testing 1.3.18): yup, that's got it - 1.3.18 is the key thanx for your assistance, I was starting to get worried that this functionality had gone forever... I run perl as cgi from apache so there's no problem there and I'm running PHP4.0.4 as a module (which looks fine) >Unformatted: [In order for any reply to be added to the PR database, you need] [to include 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! ]