Solved

LMHOSTS only working partially.

Posted on 2008-10-28
5
743 Views
Last Modified: 2011-10-19
In order to test recognition of different domains/hosts in a web application, I wanted to use LMHOSTS to have my local IIS 7 react to different URLs. Only the default web site is configured - all those URLs are supposed to be handled by the same application.

I have, for example, the domains alstest1.de and alstest2.de (read: Al's Test One and Al's Test Two). The LMHOSTS entries for alstest1.de, www.alstest1.de, alstest2.de and www.alstest2.de all work properly and redirect to localhost.

The other entries (www.vanitytest1.de, client1.alstest1.de) do not. What could I be doing wrong? I'm especially confused as the urls mentioned above work fine, even when I change the order in the LMHOSTS file...

Please help.

lmhosts
0
Comment
Question by:softwareservice
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
mrwalker15 earned 250 total points
ID: 22823943
Why dont you use dns instead of netbios?

you should change the hosts file instead.
0
 
LVL 1

Author Comment

by:softwareservice
ID: 22824405
Because apparantly I don't know better. Could you point me in the right direction, please? TIA!
0
 
LVL 3

Assisted Solution

by:mrwalker15
mrwalker15 earned 250 total points
ID: 22824435
Under c:\windows\system32\drivers\etc\ you have a file called hosts.

Insert all the entries and Ip addresses that you need.

after that, run from command prompt.

ipconfig /flushdns
0
 
LVL 1

Author Comment

by:softwareservice
ID: 22825235
The HOSTS file worked. Thank you!
0
 
LVL 1

Author Closing Comment

by:softwareservice
ID: 31510835
Thanks a lot!
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question