Re: [users@httpd] (REPORT) Doing redirects based on client address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Krist,

Thank you!

-- Rob

Krist van Besien said the following on 01/09/2006 02:48 AM:
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
  

-- 
Rob Tanner
UNIX Services Manager
Linfield College, McMinnville OR

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux