Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Could describe more specific what you are trying to do? Are you administering the foreign website? What webserver is running? – qbi Oct 18 '10 at 21:22
Example, I could block yahoo editing the hosts. But how can I, instead of blocking it, redirect when someone tries to access it to a page with the info why that access couldn't be completed etc? – FRD Oct 18 '10 at 21:42
up vote 4 down vote accepted

You would need a webserver running on localhost so that when your host's modification points, to use your example, to, it would query the local webserver which would show the page.

For a lightweight server, i'd recommend lighttpd

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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