Using hosts file to redirect URLs locally

There are times when you want to access machines on LAN or internet using the IP address. Hosts files in various systems can help you auto redirect logical names to the IP address. For example

127.0.0.1 mysite.com

Now whenever you will call mysite.com, you will be pointing to localhost. Similarly you can use any IP address on LAN or Internet and redirect logical names to them.

More on usage of hosts file : en.wikipedia.org/wiki/Hosts_(file)