Ok,

How might I match?

10.10.131.0 - 10.10.131.127

Thanks,

Dave

-----Original Message-----
From: Lucas, David 
Sent: Friday, July 29, 2005 3:46 PM
To: users@httpd.apache.org
Subject: RE: [EMAIL PROTECTED] mod_rewrite

Great!!  Thank you!!  That worked!!

-----Original Message-----
From: Noah [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 29, 2005 1:48 PM
To: users@httpd.apache.org
Subject: Re: [EMAIL PROTECTED] mod_rewrite

On Fri, Jul 29, 2005 at 12:49:00PM -0400, Lucas, David wrote:
> Hello,
> 
> I have an interesting dilemma that I need to figure out a solution to.
> I hope someone on this list can help me.
> 
> 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:
> 
> 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

-- 
Neil! Your bed's on fire!

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to