html page that directs you to a different page?

Discussion in 'Web Design and Development' started by howard, Jan 15, 2008.

  1. howard macrumors 68020


    Nov 18, 2002
    Say you have sent out a link to a certain webpage on your site, but you changed the site and now the old link is dead. is it possible to set up an html file at the old link that automatically directs the browser to the new page?

    i feel like this should be an easy answer... i just don't know it!
  2. angelwatt Moderator emeritus


    Aug 16, 2005
    Two ways to accomplish:

    1. HTML: <meta http-equiv="refresh"
      content="0;url=http://new.url" />
      -- You can change the "0" to a different wait time till redirect. That's helpful if you put in a dummy page saying why they're being redirected.
    2. Apache web server: Redirect 301 /oldpage -- The 301 means it's a permanent redirect. The destination URL must be the full thing, http and all. For further reading,
    3. Additional reading for your pleasure,
  3. MrSmith macrumors 68040


    Nov 27, 2003
    How's about this for a complete page?

    Can't for the life of me remember where I got it, so comments welcome. Anyway, I've used it.

    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""><html xmlns=""><head><title></title><meta http-equiv="refresh" content="0;url= welcome.html" /></head><body></body></html>
  4. howard thread starter macrumors 68020


    Nov 18, 2002

Share This Page