1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect question

Discussion in 'White Hat SEO' started by bigwhite, Jul 7, 2012.

  1. bigwhite

    bigwhite Regular Member

    Joined:
    Sep 27, 2011
    Messages:
    473
    Likes Received:
    54
    So GWT is showing over 1k 404 errors, which is from when I switched platforms for my eCommerce site.

    I would like to have all of these 404's redirected to my homepage. Not all of them are the same type of 404 error. Basically I am wondering what type of code I will need to do about 1k in one run, and would this be a good idea? I figure might as well grab the link juice from the last site that is no longer coming through anymore.

    Any idea on how I would go about doing this in a timely manner would be great. I dont want to individually do each link in htaccess. Copying all the links and then a line above it etc would be great.
     
  2. TZ2011

    TZ2011 Senior Member

    Joined:
    Jun 26, 2011
    Messages:
    832
    Likes Received:
    863
    Occupation:
    Cleaning servers
    Put this in .htaccess

    RewriteEngine on
    ErrorDocument 404 /index.php

    If you have already line RewriteEngine on, no need to repeat it, put just second line.
     
    • Thanks Thanks x 1
  3. bigwhite

    bigwhite Regular Member

    Joined:
    Sep 27, 2011
    Messages:
    473
    Likes Received:
    54
    Like I said, they are not all the same type 404 error, so that would not work.
     
  4. lexblast

    lexblast Junior Member

    Joined:
    Jan 5, 2011
    Messages:
    118
    Likes Received:
    25
    do you have access to apache conf? all the same domain? if so just use a redirect directive in apache config.
     
  5. TZ2011

    TZ2011 Senior Member

    Joined:
    Jun 26, 2011
    Messages:
    832
    Likes Received:
    863
    Occupation:
    Cleaning servers
    Without more details is hard to give help, but basically all kinds of redirects can be made with .htaccess and rewrite / redirect directives. Site www.stackoverflow.com have a lot of examples and solutions.
     
  6. futurestic06

    futurestic06 Supreme Member

    Joined:
    Apr 16, 2011
    Messages:
    1,204
    Likes Received:
    146
    I think you can definitely get a solution in stackoverflow dot com. yes, its true that its hard to give help without having other information.