[Prev][Next][Index][Thread]
Getting the domain from a request under HTTP/1.0
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.
Simple enough, however, some people have put out their URL as
'http://www.xxx.co.uk/' 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://www.westwind.co.uk/ 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?
If you're interested, the server at http://www.wdi.co.uk/ was written
by me 8 months ago. It supports the then HTTP/1.0 protocol but hasn't
been upgraded to HTTP/1.1 yet. I'm working on it :)
Anyway, thanks for any help,
Matt
-----------------------------------------------------------------------Matthew Denner email: matt@wdi.co.uk
Senior Programmer tel: (+44)(0) 1305 871 543
Abbotsbury Software Ltd fax: (+44)(0) 1305 871 688
ENGLAND mobile: (+44)(0) 385 795 492
Sulu: Windows users of the starboard bow Captain
Spock: It's life Jim, but not as we know it
Kirk: Warp speed Mr Sulu .... Engage
-----------------------------------------------------------------------
Follow-Ups: