0

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?

Alex
  • 2,357
  • 5
  • 32
  • 41

1 Answers1

4

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.

Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448
  • 1
    life saving trick. for windows users, you can edit windows\system32\drivers\etc\hosts to get same result. – Mohamed Aug 21 '09 at 00:40