On 1/9/06, Krist van Besien <krist.vanbesien@xxxxxxxxx> wrote: > On 1/9/06, Rob Tanner <rtanner@xxxxxxxxxxxx> 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] I see my mailer managed to mangle the lines. #asume campus A IPs start with 10.10 RewriteCond %{REMOTE_ADDR} ^10\.10 RewriteRule /servicepacks/(.*) http:/www.A.linfield.edu/servicepacks/$1 [R] Hope this is clearer, Krist -- krist.vanbesien@xxxxxxxxx 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx