httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krist van Besien <krist.vanbes...@gmail.com>
Subject Re: [users@httpd] (REPORT) Doing redirects based on client address
Date Mon, 09 Jan 2006 10:45:00 GMT
On 1/9/06, Rob Tanner <rtanner@linfield.edu> wrote:

> I'm try to figure out how to do a redirect based on the client's IP
> address but a search for examples has turned up nothing.
>
> Basically, I have two campuses, A and B, connected by a WAN link.  Our
> concern is with Windows service pack updates and other equally large
> files because they're huge and the link is small.  Therefore, if someone
> from a machine on campus A tries to download a file from the server on
> campus B, I want them to be redirected to campus A's server, and vice
> versa for clients on campus B.

Use a rewritecond on %{REMOTE_ADDR}

For example on server on campus B

RewriteCond %{REMOTE_ADDR}         ^10\.10          #asume campus A
IPs start with 10.10
RewriteRule /windowsupdate/servicepacks/(.*)
http:/www.campusa.linfield.edu/windowsupdate/servicepacks/$1 [R]

HTH,

Krist


--
krist.vanbesien@gmail.com
Solothurn, Switzerland

---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message