Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 64345 invoked from network); 24 May 2004 18:44:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 May 2004 18:44:49 -0000 Received: (qmail 42154 invoked by uid 500); 24 May 2004 17:14:28 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 42029 invoked by uid 500); 24 May 2004 17:14:26 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 41910 invoked by uid 98); 24 May 2004 17:14:24 -0000 Received: from nick@webthing.com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(80.229.52.226):. Processed in 0.056917 secs); 24 May 2004 17:14:24 -0000 X-Qmail-Scanner-Mail-From: nick@webthing.com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(80.229.52.226):. Processed in 0.056917 secs) Received: from unknown (HELO hugin.webthing.com) (80.229.52.226) by hermes.apache.org with SMTP; 24 May 2004 17:14:24 -0000 Received: by hugin.webthing.com (Postfix, from userid 500) id 139093CA64; Mon, 24 May 2004 18:14:07 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by hugin.webthing.com (Postfix) with ESMTP id 09D6C3CA63 for ; Mon, 24 May 2004 18:14:07 +0100 (BST) Date: Mon, 24 May 2004 18:14:06 +0100 (BST) From: Nick Kew To: users@httpd.apache.org In-Reply-To: <40B192E5.9931.7624949@localhost> Message-ID: References: <40B192E5.9931.7624949@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] Conditional RewriteRule X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Mon, 24 May 2004, Rick wrote: > This is a question about using conditions in mod_rewrite. No it isn't. It's a question about a task, for which one possible solution might be using conditions in mod_rewrite. > This was designed to be filesystem-friendly, with a maximum of 100 pages > per directory. If you're on a modern operating system such as Linux, you may have been doing a lot of work for nothing. The kind of scheme you describe is only really necessary if your filesystem uses linear search. Putting your data on an appropriate filesystem solves that instantly. > But our canonical URLs must be of the form /widgets/.html > eg: we need to rewrite /widgets/1234.html to /widgets/0/0/1/2/1234.html Stated like that, mod_alias appears to be a simpler (and probably faster) solution than mod_rewrite. But I'm not sure you really sure how to do it in a single regexp: httpd.conf is not Perl (unless ....). The basic syntax would be the same with AliasMatch as with RewriteRule. Oh, and even in Perl, a single regexp is probably slower than two simple ones here, unless you can do it without /e. -- Nick Kew --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org