Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
1  
Think about local hosts entries. –  Ice May 10 '10 at 21:46
add comment

1 Answer

up vote 6 down vote accepted

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.

share|improve this answer
1  
Not to be too picky, but if he is running multiple local sites this would require some apache configuration, too. –  Benjamin Bannier May 10 '10 at 22:38
    
I am actually, how would one do that? –  Mohammad May 11 '10 at 10:43
    
i just found this answer superuser.com/questions/81707/… –  Mohammad May 11 '10 at 10:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.