www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: mod_rewrite/2514: Internal RewriteMaps (eg. tolower) loop when given null input
Date Mon, 29 Jun 1998 12:50:00 GMT
The following reply was made to PR mod_rewrite/2514; it has been noted by GNATS.

From: "Ralf S. Engelschall" <rse@engelschall.com>
To: pjcr100@cam.ac.uk
Cc: apbugs@apache.org
Subject: Re: mod_rewrite/2514: Internal RewriteMaps (eg. tolower) loop when given null input
Date: Mon, 29 Jun 1998 14:42:18 +0200

 In article <19980626161733.1944.qmail@hyperreal.org> you wrote:
 
 > Using the rewrite rules given in 'How can we repeat this problem?', although a
 > request of '/artichoke/hello' redirects to '/artichoke/HELLO', a request of
 > '/artichoke' or '/artichoke/' hangs.
 > This occurs with tolower and toupper, but not (AFAICS) with prg: maps.
 >>How-To-Repeat:
 > RewriteMap      uc                              int:toupper
 > RewriteRule     ^/artichoke(/(.*)$|$)           /artichoke/${uc:$2}     [R=permanent]
 
 Seems not like a problem related to RewriteMaps. Instead your rules are
 problematic. Your rules force a loop!
 
 You should either remove the redirect (i.e. translate to upper case only
 internally) or use a better URL pattern for the RewriteRule which avoids the
 redirect when the URL already is upper-case. For instance:
 
   RewriteMap      uc            int:toupper
   RewriteRule     ^/artichoke   /artichoke/   [R]
   RewriteRule     ^/artichoke/(.*[a-z].*)$    /artichoke/${uc:$1}  [R=permanent]
 
 Greetings,
                                        Ralf S. Engelschall
                                        rse@engelschall.com
                                        www.engelschall.com

Mime
View raw message