www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bishop <...@easily.co.uk>
Subject mod_rewrite/7302: Apache 1.3.14, 1.3.17 mod_rewrite problems
Date Fri, 23 Feb 2001 15:25:55 GMT

>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:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Feb 23 07:30:00 PST 2001
>Originator:     tim@easily.co.uk
>Release:        1.3.14, 1.3.17
Microsoft Windows 98 4.10.2222 A 
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 - - [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 - - [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?

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]
I haven't a clue!
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@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!     ]

View raw message