Re: Getting the domain from a request under HTTP/1.0

Matthew Denner wrote:
> 
> All,
> 
> I've got a problem that I don't think is solvable using HTTP/1.0.  Our
> site here (http://www.wdi.co.uk/) is supporting multiple companies
> under subdirectories.  Each of these companies has registered a
> domain name (for example, Westwind have registered westwind.co.uk that
> has the IP address 193.243.226.xxx)  Now to get Westwind at the moment
> you access the HTTPd with http://www.westwind.co.uk/westwind and it
> basically becomes a request to www.wdi.co.uk for the directory westwind.


If your different companies have different IP addresses, then your
server can check the IP address which the client requested and
set the data root directory accordingly.   This is what most 
"virtual host" servers do.

If all the companies have the same IP address then you might have
your server check for the Host header.  Lots of clients supply it
(e.g. Netscape 2.X and 3.X).  If there is no Host header you could
send a default menu page asking the user to select which company
she wants.

-- 

John Franks 	Dept of Math. Northwestern University
		john@math.nwu.edu

Received on Thursday, 13 June 1996 10:13:39 UTC