Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 65681 invoked from network); 19 Jan 2006 23:30:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jan 2006 23:30:10 -0000 Received: (qmail 90145 invoked by uid 500); 19 Jan 2006 23:29:58 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 89882 invoked by uid 500); 19 Jan 2006 23:29:56 -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: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 89862 invoked by uid 99); 19 Jan 2006 23:29:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jan 2006 15:29:55 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jslive@gmail.com designates 64.233.184.202 as permitted sender) Received: from [64.233.184.202] (HELO wproxy.gmail.com) (64.233.184.202) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jan 2006 15:29:53 -0800 Received: by wproxy.gmail.com with SMTP id 58so345789wri for ; Thu, 19 Jan 2006 15:29:33 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ULHmBfxxIzczIMz/FIKEMvIWZHWPGMCNpuZKMDjTxVbHrvD5m0wz2t+d9r2oRFRYu6Zh29qRuB17m1tkjfrDGVwJiihbaGemIgiVTn+l5pnWxeJYDPv4/qrTmvz6tpQTrTxlLK/k1zNWF5cLQcdk5KbRDECxjW3X68eK7naHSTo= Received: by 10.65.220.16 with SMTP id x16mr809121qbq; Thu, 19 Jan 2006 15:29:32 -0800 (PST) Received: by 10.64.253.3 with HTTP; Thu, 19 Jan 2006 15:29:32 -0800 (PST) Message-ID: Date: Thu, 19 Jan 2006 18:29:32 -0500 From: Joshua Slive Sender: jslive@gmail.com To: users@httpd.apache.org In-Reply-To: <010401c61d44$11436950$0702a8c0@flownder> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <010401c61d44$11436950$0702a8c0@flownder> X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Troubles w/mod_rewrite X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 1/19/06, Jason Williard wrote: > > You were right... As soon as I removed the leading slash, the problem was > solved. But now I have another issue... > > While I want this rewrite to occur, I also want everything else to redire= ct > to a default URL. To do this, I added the following: > > RewriteRule ^([0-9]{5}) http://.../weather.pl?zip=3D$1 [R] > RewriteRule ^(.*) http://.../DEFAULT [R] > > The first of these rules intended to rewrite only if a 5 number zip exist= s. > The second to redirect everything else. Unfortunately, that much of a > wildcard also seems to grap 5-digit zips as well. I'm sure this is simpl= y a > regex thing, which I'm not that great at. How would I get it to redirect > everything except for the 5-digit zip? The easy way would simply be to add the "L" flag to the first RewriteRule (use [R,L]). This should stop processing at that point for matching requests. Otherwise, you can add something like this before the second RewriteRule: RewriteCond %{REQUEST_URI} ^/[0-9]{5}$ Joshua. --------------------------------------------------------------------- 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