Re: Domains and HTTP_HOST

Klaus Johannes Rusch (e8726057@student.tuwien.ac.at)
Thu, 7 Nov 1996 16:04:23 CET


In <199611070223.TAA09749@smtp.radzone.org>, Brian Clark <bclark@radzone.org> writes:
> While this seems to make sense, there are always problems with directories
> that exist in both (such as /cgi-bin or /image) that complicate simple
> solutions :(

Doesn't sound like a real world problem, let's look through the possible
cases.

Case 1:
-------
URL: http://ipaddressoraname/document
Host: aname

HTTP/1.1 compliant and correct location, send the document.

Case 2:
-------
URL: http://ipaddressoraname/document

HTTP/1.0 compliant, present a list of virtual servers to pick from
(or, if you can identify the virtual server based on the unique
URL, redirect to the /~aname/document).

The only assumption here is that the server does NOT run a
non-virtual server at the same IP address, i.e. that /document
is not a valid URL (except, of course, for the virtual /~document URLs).

Case 3:
-------
URL: http://ipaddressoraname/~aname/document
Host: aname

HTTP/1.1 compliant and incorrect location, so redirect to

http://aname/document

Note that ~aname is unique since the virtual server usually cannot have
user directories prefixed with a tilde character.

Continues at case 1.

Case 4:
-------
URL: http://ipaddressoraname/~aname/document

An non-HTTP 1.1 compliant client accessing the virtual location, just
give it the document.

Side note: I wonder why Host: was introduced other than for increasing
complexity of server configuration and indexing, running virtual servers
using different interfaces is much easier to handle (but slightly more
expensive of course).

Klaus Johannes Rusch

--
e8726057@student.tuwien.ac.at, KlausRusch@atmedia.net
http://www.atmedia.net/KlausRusch/