To have fun with your friends, I am sharing a little trick here. By this, you can replace a site with another one, i.e. the address bar will show a different site but page content will be loaded from another site.
Suppose, your friend has Google-mania. He always use this world famous search engine to find contents. But next time when he type www.google.com in the address bar and wait for the page to be loaded, the Yahoo home page appears suddenly. Wouldn't be he amazed?
Open Run box from Start menu or directly by pressing Win+R. Now copy and paste this line in the Run box and press OK.
The Host file will open with notepad. Now go to the last line of file and press enter and type the line as below:
Now save the file by pressing Ctrl+S or by going to menu File ⇒ Save and close it. The task is over. Now whenever anyone will try to access the site google.com, the Yahoo home page will open.
If you are not allowed to save the edited file at its original location, then save it somewhere else, then copy the file and paste it to that folder to replace the original file.
How it Works
In all Windows systems, the Hosts file is used to keep a local information for primary DNS lookup. When we try to access a website from the browser, the OS first looks for it's corresponding IP address in the Hosts file. If not fond, it then queries the ISP to translate that domain name to corresponding IP address.
What we are doing here is actually providing a wrong information to the OS. It simply accepts the IP of
yahoo.com (22.214.171.124) as that of google.com. All these happens behind the scene, so the user has no idea why his computer has gone mad.
The trick can also be used to block websites from opening in any browser.