0

I'm attempting allow a hostname to used as synonyms for another hostname.

For example : configure mymachine.com to be a synonym for localhost:8080 so if mymachine.com is navigated to in browser the url that is used in background is localhost:8080 .

I have tried modifying windows hosts file but this is incorrect as hosts file is used for resolving hostnames to ip addresses, not resolving hostnames to other hostnames.

blue-sky
  • 629
  • 3
  • 10
  • 22

1 Answers1

0

Localhost is always 127.0.0.1, so your hosts file can read mymachine.com 127.0.0.1 and it will resolve to localhost.

Also, you can alias as many host names as you like to that same address.

Wes Sayeed
  • 13,662
  • 6
  • 41
  • 76