Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Redirecting Old Indexed Pages


  • Please log in to reply
No replies to this topic

#1 Kris

Kris

    HR 2

  • Members
  • PipPip
  • 39 posts
  • Location:Geordie Land, United Kindom

Posted 30 October 2009 - 05:42 AM

Hi all

Just wanted to get advice or comments on if my current procedure is the correct method or not.

When I rebuild a website in PHP for an existing customer, I currently take note of all the indexed pages of their existing website and set out a php script which will map the old url's to redirect to the new url's. An example would be as follows:


Old URL: www.mydomain.com/products.php?pid=123

New URL: www.mydomain.com/products/mens/grey-shirt

Now I do this by impementing a HTTP 301 Moved Permanently redirection as follows:

CODE
switch ($_SERVER['REQUEST_URI']) {
        case 'products.php?pid=123':
            header("HTTP/1.1 301 Moved Permanently");
            header("Location: /products/mens/grey-shirt");
            exit();
        break;
    }


I know some of you may not be familiar with PHP but for those who are, is this the best method in ensuring old indexed pages maintain their index within the search engine when the new website is uploaded to the live server?

Many thanks for reading.
Kris




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

We are now a read-only forum.
 
No new posts or registrations allowed.