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

Matthew Denner writes:

| Simple enough, however, some people have put out their URL as
| '' without the directory name.  My question is 
| this: under HTTP/1.1 the client should send through the entire URI
| in it's header (GET HTTP/1.1) or include 
| the 'Host:' field.  However, HTTP/1.0 is not as clever and, as I have
| noticed, clients don't send through the address.  So, how can I get
| it from an HTTP/1.0 request?

Your best bet for this sort of thing is probably to bring up multiple 
interfaces on the machine (if you want/have to use just one machine) 
using virtual interfaces, aka IP address aliasing, if your operating 
system supports it.  Off the top of my head, Linux (recent kernel 
versions only?), SunOS (with the vif loadable module), and Solaris do, 
and recent *BSDs too, but your mileage will vary on any others.

You can either run a separate server bound to each IP address, or have 
a smart server which knows about the multiple (virtual) interfaces and 
routes requests accordingly - like Apache does, for instance.

Hope that helps!


Received on Thursday, 13 June 1996 10:06:05 UTC