httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saqib.N....@seagate.com
Subject [users@httpd] REGEX in mod_rewrite
Date Tue, 17 Aug 2004 19:11:50 GMT
Hello All,

I think this is REGEX question:


I have the following REWRITE rule that redirects all traffic from client 
having the first 3 octets as 129.219.150.* to http://www.eas.asu.edu/

RewriteCond %{REMOTE_ADDR}       ^129.219.150.*
RewriteCond %{REQUEST_URI}       /web/*
RewriteRule  ^/web(.+)   http://www.eas.asu.edu/$1 [L]

This works.

But now I would like to change it a little bit, by adding more 
granularity. i.e. all traffic coming from:

129.219.(1-150).*   should go to http://www1.eas.asu.edu ; and
129.219.(151 - 250).*     should go to http://www2.eas.asu.edu

How can I write a REGEX for mod rewrite to do this?

Thanks.
Saqib Ali
http://validate.sf.net   <<< DocBook XML -> XHTML/PDF Convertor.
Mime
View raw message