Jaggu
Jaggu

Reputation: 6428

Changing in hosts file

I have configured my website from VS2010 to use IIS 7.5. Then I added this line to my hosts file:

127.0.0.1 something.com

This correctly goes to IIS 7.5 default screen

However I want this to go to my website that is hosted in IIS 7.5. So I changed the above line to:

127.0.0.1/MyWebSiteHostedinIIS something.com

But when I did this it stopped working. Any ideas what am I doing wrong and how can I correct this?

Thanks.

Upvotes: 0

Views: 1431

Answers (1)

Ofer Zelig
Ofer Zelig

Reputation: 17470

hosts file only maps domains to IP addresses. It does not handle "virtual folder" mappings.

You should leave your original line intact:

127.0.0.1 something.com

In IIS, right-click your site, choose Edit Bindings..., click Add, and under Host name type something.com.

Upvotes: 1

Related Questions