httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krist van Besien <>
Subject Re: [users@httpd] (REPORT) Doing redirects based on client address
Date Mon, 09 Jan 2006 10:48:23 GMT
On 1/9/06, Krist van Besien <> wrote:
> On 1/9/06, Rob Tanner <> 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:/$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:/$1 [R]

Hope this is clearer,

Solothurn, Switzerland

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message