How can I automatically redirect a website to an html page inside my computer? I need to do this everytime I try to access the website in my ubuntu. Thanks.
You would need a webserver running on localhost so that when your host's modification points, to use your example, yahoo.com to 127.0.0.1, it would query the local webserver which would show the page.
For a lightweight server, i'd recommend lighttpd