If you've ever wanted to setup a wildcard entry in your hosts file so you don't have to add an entry for every IIS binding you'll be happy to know there is a way.
The trick however is not to use the hosts file but a local DNS proxy instead. Acrylic DNS is a free and open source which you can download here. You use it in much the same way you would use a hosts file.
Stackoverflow has a great answer detailing how to set it up:
Configuring Acrylic DNS Proxy
To configure Acrylic DNS Proxy, install it from the above link then go to:
- Start
- Programs
- Acrilic DNS Proxy
- Config
- Edit Custom Hosts File
Add the folowing lines on the end of the file:
127.0.0.1 *.localhost
127.0.0.1 *.local
Restart the Acrilic DNS Proxy service:
- Start
- Programs
- Acrilic DNS Proxy
- Config
- Restart Acrilic Service
You will also need to adjust your DNS setting in you network interface settings:
- Start
- Control Panel
- Network and Internet
- Network Connections
- Local Area Connection Properties
- TCP/IPv4
Set "Use the following DNS server address":
Preferred DNS Server: 127.0.0.1