D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] Conditional HTTP redirects based on URL

 

Hi all,

As some of you may know, I have 2 virtual servers at work - one SBS2008
(*shudder*) and one Debian Lenny.  We have remote.domain.tld and
demo.domain.tld as CNAME records pointing to our domain.dyndns.org, which
in turn points to whichever of our 2 ADSL lines is currently in use
(they're configured as failovers).  Now, our routers currently pass all
incoming :80 and :443 traffic to the SBS2008 machine, so
http(s)://remote.domain.tld will take you to the SBS machine nicely.  What
I would like is for http(s)://demo.domain.tld to go to the Debian box. 
None of the routers we have support URL-based conditions for incoming
traffic - IP and ports only.  I don't want http(s)://demo.domain.tld:81 or
anything silly like that - this is supposed to be easy to remember...
having to remember to use :81 at the end is possibly too much for some
people that will be using this.

So, is it possible to redirect traffic from one web server to another
conditionally?  Internally the SBS machine is called "server1" and the
Debian machine is "server2" (catchy, ain't it?!).  I don't mind if it's IIS
redirecting all demo.domain.tld traffic to server2, or Apache2 redirecting
all remote.domain.tld traffic to server1.

I hope that makes sense.

Cheers.
Grant. :)


-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html