- From: Jim Dabell <jim-www-html@jimdabell.com>
- Date: Fri, 14 Mar 2003 18:36:26 +0000
- To: www-html@w3.org
On Friday 14 March 2003 6:13 pm, Erica Douglass wrote: > To see why, I tailed our browser logs and grabbed the command that > Mosaic was using -- a simple GET / HTTP/1.0. I telnetted in to a couple > of the domains we host on port 80 and issued the same command. I got > back an odd response -- a 403 Found with a link to the same website I > had just requested. For instance, telnetting to www.onthehouse.com port > 80 sends the Found URL back as http://www.onthehouse.com. No wonder this > poor old browser was falling into an infinite loop! That sounds strange. Check what the default website is doing, it shouldn't be issuing a redirect as far as I can see. The redirect doesn't aid backwards compatibility, as it can only retrieve the default website, even if it /is/ redirected to the other one. > I vaguely remember that this has something to do with name-based virtual > hosting. I have two questions. > > 1. What do modern browsers do to get around this? I understand that they > send some sort of HOST header, but what should I do e.g. if I am > telnetting into the server? GET / HTTP/1.0 HOST: www.onthehouse.com > 2. Would turning off name-based virtual hosting for sites that are using > their own IP address result in a performance gain? The browser would not > have to send two requests... but perhaps modern browsers always send the > HOST header and thus name-based virtual hosting is no slower than > regular IP-based hosting. As far as I am aware, all modern browsers send a host header. If they didn't, large amounts of the web would break, as name-based virtual hosting is extremely common. It's also required as part of HTTP 1.1. Having said that, if you have the extra ip addresses, you might as well use them. For instance, I believe google rates inbound links higher when they come from a different ip address. You can be a bit more flexible with virtual hosting when using Apache when you have a few ip addresses to play around with as well. -- Jim Dabell
Received on Friday, 14 March 2003 13:43:13 UTC