Alex Rivera | Logout

How reliable is HTTP_HOST?

Asked 2010-11-04T11:26:47.363
9

I have written a PHP script that I would like to use on several domains on the same server (pointing to same script). I want to add functionality to the script so I can find out which domain the script is working with at any time. HTTP_HOST can be used to find the domain ,however, I have read that its not reliable especially with older browsers. My understanding is most Apache servers use virtual hosts which uses the same method anyway so if its not a problem with hosting providers it shouldn't be an issue with my code.

Can any one please verify this and clear the confusion ?

Edit
Report

1 Answer

0

This is what I answered in a similar question :


Looking into this myself for other purposes:

"HTTP/1.0 is in use by proxies, some mobile clients, and IE when configured to use a proxy. So 1.0 appears to still account for a non- trivial % of traffic on the web overall. ... Yes, there are many 1.0 clients still out there."

Source (July 2009): http://groups.google.com/group/erlang-programming/msg/08f6b72d5156ef74

:-(


I am personally getting quite a few HTTP/1.0 requests on my sites with a missing HTTP_HOST :-(

answered 2010-11-12T18:30:28.777

Your Answer