1

for example I debug my local website this way

http://localhost/example.com/

Is there a program that would make a more convenient alias for it like for example

http://example.com

forcing my browser to use my local files and not the ones online?

Mohammad
  • 435

1 Answers1

6

I find 'localhost' easier to type, fewer keystrokes! It gives you a chance to imagine life before TLDs!

To accomplish what you're asking, you can add a line to your Hosts file like:

127.0.0.1       example.com 

This would skip DNS lookup for example.com and go straight to your local IP. For the location of the Hosts file on your system, check out the corresponding Wikipedia article.

Neil
  • 445
  • 3
  • 4