IE6 ignoring HOSTS entries for HTTP

  • Thread starter Thread starter Sydney Delieu
  • Start date Start date
S

Sydney Delieu

Hello,

I use XP Home and NTL broadband (cable) at home. To access a work
computer (that runs IIS and MS-SQL Server 2000) over the Internet, I
have the following entry in my hosts file:

123.123.123.123 webserver

From Internet Explorer (version 6) I can ftp://webserver and
https://webserver, but when I try to http://webserver the URL is
changed to http://www.webserver.com - a Yahoo! 'not found' page which
redirects to www.simplenet.com after 10 or so seconds.

Any help would be appreciated.

Regards,
Syd.
 
Try using a FQDN in your Hosts file:

123.123.123.123. www.webserver.com


--

Thanks,
Marc Reynolds
Microsoft Technical Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Marc said:
Try using a FQDN in your Hosts file:

123.123.123.123. www.webserver.com

Hi Marc,

Sorry, I should have mentioned in my first post that I have tried using
www.webserver.com - same thing - it takes me to the Yahoo site. Again
though, it works when I connect from another ISP (ie. hosts for http
requests fail from NTL Broadband, but works from BT ADSP Broadband
without any settings being changed on my laptop). It also resolves
everything correctly from the hosts file when I use a 56K dial-up. I
have also tried a clean install of XP Home, and have also tried
with/without a Netgear Wireless router (WGR614).

I have also tried removing the entries:

"1"="www.%s.com"
"2"="www.%s.org"
"3"="www.%s.net"
"4"="www.%s.edu"

from [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet
Explorer\Main\UrlTemplate]. I don't actually know what these entries
are used for, but I am desperate and guessed that maybe the first entry
was responsible for placing the 'www.' at the front of, and then '.com'
at the end of 'webserver'.

I have tried pointing to different DNS servers, nothing changes. It
just seems strange that from my NTL ISP the hosts file entries are
being ignored and entering 'webserver' in the address bar results in
the address being changed to 'www.webserver.com'. Even having a FQDN in
the hosts file results in the Yahoo page being brought up instead of my
hosts file entry.

I am desperate as the system I have will not work unless 'webserver' is
resolved from the hosts file (a 3-tier system with SSL etc...). Any
help on this would be really appreciated.

Regards,
Syd.
 
Sydney Delieu said:
Sorry, I should have mentioned in my first post that I have tried
using www.webserver.com - same thing - it takes me to the Yahoo site.
Again though, it works when I connect from another ISP (ie. hosts for
http requests fail from NTL Broadband, but works from BT ADSP
Broadband without any settings being changed on my laptop). It also

NTL uses transparent Web proxies. All HTTP traffic is channeled through
them and from what I understand--and it matches what you've found--the IP
Address the browser connects to is ignored and the hostname supplied in the
HTTP Request is used. That is they do their own DNS lookup.

I don't fully understand why "webserver" gets redirected though...

Anyway.
- Either you need to get a real entry in the real DNS system. This is best
and I can't see why it would be difficult to arrange.
- Or use a different port number on the web server.
- Or just use the IP Address in your URLs.
- Or try using a totally false name in the hosts file, e.g.
www.webserver.locallocallocal
- Or...

[...]
I am desperate as the system I have will not work unless 'webserver'

Why does it need to be referred to as "webserver"? Does the target web
server run multiple virtual web sites and rely on the "Host: webserver"
header? If so, www.webserver.com" wouldn't work...and you imply it
should...

is resolved from the hosts file (a 3-tier system with SSL etc...). Any
help on this would be really appreciated.
HTTPS! You throw that in to the pot a bit late. :-) If you are using HTTPS
to connect to the web server then obviously the proxies can't get involved
and there will be no problem...
 
Hi Alan,

Thank you so much for the information. Sorry about not mentioning the
use of SSL earlier.

I should have also mentioned that when I remove 'webserver' entry from
the hosts file, and then enter 'http://webserver' in the address bar of
IE6, I get 'The page cannot be displayed'.

The reason why the Win2K box is called 'webserver' is something I know
nothing about and have no control over. The reason why the hosts entry
for 'webserver' is required on client machines running the application
I have written is because the SSL certificates' common name had to
match the name of the server for the clients to be able to successfully
install the self-generated and signed certificate as trusted and not
receive warnings about name not matching or untrusted Certificate
Authority etc... Unless the client has installed the certifiate as
trusted, the client application will not successfully connect to the
application servers (middle-tier) as it's very touchy and will exit at
the first sign of a warning. Similarily, MS-SQL has the 'force protocol
encryption' option checked, and will not start if the
self-generated/self-signed certificate uses anything else other than
the name of the Win2K box as the common name.

Personally, I would love my employer to go out and register a fully
qualified domain name and purchase an SSL certificate from Thrawte or
Verisign, but for various reasons, it just aint gonna happen :(

Once again, thanks so much for the info. My mind is now at ease (at
least now I know 'why').

Regards,
Syd.


Sydney Delieu said:
Sorry, I should have mentioned in my first post that I have tried
using www.webserver.com - same thing - it takes me to the Yahoo
site. Again though, it works when I connect from another ISP (ie.
hosts for http requests fail from NTL Broadband, but works from BT
ADSP Broadband without any settings being changed on my laptop). It
also

NTL uses transparent Web proxies. All HTTP traffic is channeled
through them and from what I understand--and it matches what you've
found--the IP Address the browser connects to is ignored and the
hostname supplied in the HTTP Request is used. That is they do their
own DNS lookup.

I don't fully understand why "webserver" gets redirected though...

Anyway.
- Either you need to get a real entry in the real DNS system. This
is best and I can't see why it would be difficult to arrange.
- Or use a different port number on the web server.
- Or just use the IP Address in your URLs.
- Or try using a totally false name in the hosts file, e.g.
www.webserver.locallocallocal
- Or...

[...]
I am desperate as the system I have will not work unless 'webserver'

Why does it need to be referred to as "webserver"? Does the target
web server run multiple virtual web sites and rely on the "Host:
webserver" header? If so, www.webserver.com" wouldn't work...and you
imply it should...

is resolved from the hosts file (a 3-tier system with SSL etc...).
Any help on this would be really appreciated.
HTTPS! You throw that in to the pot a bit late. :-) If you are
using HTTPS to connect to the web server then obviously the proxies
can't get involved and there will be no problem...
 
Just an uneducated guess, but if you run out of things to try:
123.123.123.123:80 webserver

Alan J. McFarlane said:
Sydney Delieu said:
Sorry, I should have mentioned in my first post that I have tried
using www.webserver.com - same thing - it takes me to the Yahoo site.
Again though, it works when I connect from another ISP (ie. hosts for
http requests fail from NTL Broadband, but works from BT ADSP
Broadband without any settings being changed on my laptop). It also

NTL uses transparent Web proxies. All HTTP traffic is channeled through
them and from what I understand--and it matches what you've found--the IP
Address the browser connects to is ignored and the hostname supplied in the
HTTP Request is used. That is they do their own DNS lookup.

I don't fully understand why "webserver" gets redirected though...

Anyway.
- Either you need to get a real entry in the real DNS system. This is best
and I can't see why it would be difficult to arrange.
- Or use a different port number on the web server.
- Or just use the IP Address in your URLs.
- Or try using a totally false name in the hosts file, e.g.
www.webserver.locallocallocal
- Or...

[...]
I am desperate as the system I have will not work unless 'webserver'

Why does it need to be referred to as "webserver"? Does the target web
server run multiple virtual web sites and rely on the "Host: webserver"
header? If so, www.webserver.com" wouldn't work...and you imply it
should...

is resolved from the hosts file (a 3-tier system with SSL etc...). Any
help on this would be really appreciated.
HTTPS! You throw that in to the pot a bit late. :-) If you are using HTTPS
to connect to the web server then obviously the proxies can't get involved
and there will be no problem...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top