Return-Path: Delivered-To: apache-bugdb-archive@hyperreal.org Received: (qmail 28288 invoked by uid 6000); 29 Jun 1998 12:50:03 -0000 Received: (qmail 28233 invoked by uid 2001); 29 Jun 1998 12:50:00 -0000 Date: 29 Jun 1998 12:50:00 -0000 Message-ID: <19980629125000.28232.qmail@hyperreal.org> To: apache-bugdb@apache.org Cc: apache-bugdb@apache.org, From: "Ralf S. Engelschall" Subject: Re: mod_rewrite/2514: Internal RewriteMaps (eg. tolower) loop when given null input Reply-To: "Ralf S. Engelschall" Sender: apache-bugdb-owner@apache.org Precedence: bulk The following reply was made to PR mod_rewrite/2514; it has been noted by GNATS. From: "Ralf S. Engelschall" 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