301 Redirects and .htaccess?

Discussion in 'Search Engine Optimization' started by ianv, Mar 24, 2011.

  1. #1
    We have just changed our site to a new design and a new structure. Looking through webmaster tools there are a lot of missing pages as the new site has a new structure.

    The problem is if the page is no longer available and you want to keep the link juice how do you redirect from oldpage.php to newpage.php and anotheroldpage.php to anothernewpage.php?

    Do you put a 301 redirects in the a .htaccess file or do you set a 301 on another page in the site? as there are over 60 of these pages and if it can be done in one place then this would be a better option rather than adding the code below to each page as the older site pages no longer exist

    <?
    Header( “HTTP/1.1 301 Moved Permanently” );
    Header( “Location: http://www.mydomain.co.uk/intro.php” );
    ?>

    Does anybody have any examples of a file of how you would do 301 redirects for lots of the redundant pages throughout your site?
     
    ianv, Mar 24, 2011 IP