Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 84847 invoked from network); 29 Jul 2005 19:46:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Jul 2005 19:46:23 -0000 Received: (qmail 89195 invoked by uid 500); 29 Jul 2005 19:46:08 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 89154 invoked by uid 500); 29 Jul 2005 19:46:08 -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 89124 invoked by uid 99); 29 Jul 2005 19:46:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2005 12:46:07 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [132.177.152.51] (HELO Ian.ad.unh.edu) (132.177.152.51) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2005 12:45:59 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 29 Jul 2005 15:46:04 -0400 Message-ID: <5D110F8947F71441AD5003BEC2471F6A025381E2@ian.ad.unh.edu> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [users@httpd] mod_rewrite Thread-Index: AcWUZbSQlb9czSskRF2IkYs58Z4yZQAEGjxA From: "Lucas, David" To: X-Virus-Checked: Checked by ClamAV on apache.org Subject: RE: [users@httpd] mod_rewrite X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Great!! Thank you!! That worked!! -----Original Message----- From: Noah [mailto:sitz@onastick.net]=20 Sent: Friday, July 29, 2005 1:48 PM To: users@httpd.apache.org Subject: Re: [users@httpd] mod_rewrite On Fri, Jul 29, 2005 at 12:49:00PM -0400, Lucas, David wrote: > Hello, >=20 > I have an interesting dilemma that I need to figure out a solution to. > I hope someone on this list can help me. >=20 > I have Apache running on a Linux server. I need to change the document > root based on source IP address. I have this working and it works very > well. Now, with the nature of a couple of our subnets I'm not sure how > to go about it. This is one that is working: >=20 > RewriteEngine on > RewriteCond %{REMOTE_ADDR} (^10\.10\.41\.[0-9]|^10\.10\.49\.[0-9]) > RewriteRule ^(.*) /blocked/$1 > RewriteCond %{REMOTE_ADDR} (!^10\.10\.41\.[0-9]|!^10\.10\.49\.[0-9]) > RewriteRule ^/blocked/(.*) /$1 [snip] > How would I make apache change the document root for 10.10.224.128 - > 10.10.224.254 to the blocked location but if you have a source IP of > 10.10.224.56 then you would get the registration page which is located > in /var/www/html?? The following regex which match 10.10.224.128 - 10.10.224.254: ^10\.10\.224\.(1(2[89]|[3-9][0-9])|2([0-4][0-9]|5[0-4]))$ ...is that more or less what you needed? --n --=20 Neil! Your bed's on fire! --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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