1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Redirecting all pages to main index page

Discussion in 'Site & Server Administration' started by jasonsc, Dec 10, 2008.

  1. #1
    I thied hard to google this one but didn't get the right solution (at least not one that would not give me 500 error back)

    I am shutting down a site and I would like all the pages that ever existed on that site to redirect to main index page (mydomain.com/index.html)
    SEMrush
    Can someone help me?

    thanks, reps will be given!
     
    jasonsc, Dec 10, 2008 IP
    SEMrush
  2. dalgic

    dalgic Active Member

    Messages:
    135
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #2
    I would advise you to use .htaccess 301 redirection, this will also avoid any search engines to penalize you for it. The 301 redirect tells the browser that the page has been moved. To implement this here is the details:

    1.Create a file on the root directory of your website, name it ".htaccess".
    2.Open the .htaccess file using notepad or what ever text editor that you prefer.
    3.Add this into the .htaccess file, save it and then upload it to your web server:

    Redirect 301 /old/old.html http://www.you.com/new.html

    you can check the following link for more information: http://www.stevenhargrove.com/redirect-web-pages/
     
    dalgic, Dec 10, 2008 IP
  3. jasonsc

    jasonsc Well-Known Member

    Messages:
    1,696
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    115
    #3
    I am not trying to redirect old.html, I need to redirect ALL pages.
     
    jasonsc, Dec 10, 2008 IP
  4. dalgic

    dalgic Active Member

    Messages:
    135
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    you should be able to redirect the whole directory, if your site was in /old/ then you remove the old.html.

    you can also do permanent directions from your hosts control panel. which panel software does your hosting use? Cpanel?
     
    dalgic, Dec 10, 2008 IP
  5. jasonsc

    jasonsc Well-Known Member

    Messages:
    1,696
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    115
    #5
    OK, I found the solution. I have simply redirected all 404 pages to main index.html

    Here is what I have put in .htaccess:

    ErrorDocument 404 /index.html
     
    jasonsc, Dec 11, 2008 IP
    newbie191 likes this.
  6. dalgic

    dalgic Active Member

    Messages:
    135
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #6
    glad you sorted it out.
     
    dalgic, Dec 11, 2008 IP