How to bind the example.com address to the local box?

I'm enhancing a website, which is written so that 'example.com' is hard coded as its host. How do I do a loop back in Firefox in response to a 'example.com' request?

link|improve this question

68% accept rate
feedback

1 Answer

up vote 4 down vote accepted

Add '127.0.0.1 example.com' to the /etc/hosts file:

sudo bash -c 'echo 127.0.0.1    example.com >> /etc/hosts'

This will be system wide, not just for firefox.

link|improve this answer
1  
life saving trick. for windows users, you can edit windows\system32\drivers\etc\hosts to get same result. – Mohamed Aug 21 '09 at 0:40
feedback

Your Answer

 
or
required, but never shown

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