Super User is a question and answer site for computer enthusiasts and power users. 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

I want to redirect specific page to another page. This means that requests for any other page on will function like normal, but if bar.html is requested =, it redirects to

This is pretty much the same problem as here Redirect specific url requests to local site except it seemed no one had a solution for what I'm asking here.

I'm also looking for an OS-wide solution.

share|improve this question
After writing my answer I've noticed that you might want to perform client side redirection. Is that true? – amotzg Apr 30 '12 at 12:41
CNAME Record, .htaccess file, 302 redirect, HTTP redirect, javascript and more: If you want it on a local machine, take a look at the hosts file. – MaQleod Apr 30 '12 at 21:32

I would not suggest using meta refresh, as it has been deprecated by the W3C for violating accessibility guidelines:

Instead, you should use an HTTP 301 code, but the implementation of it is dependent on the web server you use. You can read how to use a 301 redirect in Apache here:

share|improve this answer

What you're looking for is a proxy server that will rewrite the url. Fiddler is the only one I can think of at the moment.

share|improve this answer

The simplest solution that does not even require server configuration, is to include the 'meta' HTML tag in the first page's header. And set the url attribute of the second page like so:

  bar.html :
    <meta http-equiv="Refresh" content="0;url=" />
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .