Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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, 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

share|improve this answer

Your Answer

 
discard

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.