Redirect an entire website to the homepage

Discussion in 'HTML & Website Design' started by ScottHughes, Oct 3, 2007.

  1. #1
    I have an old website, and I want to delete all the pages except the homepage and make it so that if anyone follows a link to any of the pages they will be redirected to the homepage. (The homepage will have information about the website's shutdown and where all the services can be found now, with links.) I want this redirect to be as search-engine-friendly as possible.

    I thought of seeing the 404 error page as the homepage, but I doubt that that is search-engine-friendly. A meta-refresh isn't very search-engine-friendly, and it would be inconvenient, since I would have to edit every page.

    Is there a good way to do this with .htaccess or anything?

    Thanks,
    Scott
     
    ScottHughes, Oct 3, 2007 IP
  2. bobb1589

    bobb1589 Peon

    Messages:
    289
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you can do this with .htaccess

    Redirect 301 /oldpage.html http://www.example.com/newpage.html

    put that in your .htaccess
     
    bobb1589, Oct 3, 2007 IP
    ScottHughes likes this.