Properly moving links

#1
[eluser]Neovive[/eluser]
I've searched around the web and found some differing strategies on the most search-engine-friendly way to move url's. Here is a summary of the situation:

Background
A client has an old PHP site that has been around for about six years and I am in the process of migrating the site to CodeIgniter. The website is essentially a large directory of listings. The owner previously assigned listing id's as varchars and we are migrating to an automated system in CI that utilizes a MySQL bigint with autoincrement. The new website will also utilize custom CI routes to allow site users to access listings using the actual company name (similar to WordPress slugs). The old listing id's will be maintained in the database as a field in the main listing table.

URI format
The old URI format to view listings was: domain.com/view/old_id

The new Rerouted CI URI format will be: domain.com/listing/unique-long-name which will actually reference domain.com/listing/view/id.

Links throughout the site will reference the new URI structure with the long name for SEO and readability purposes and will lookup the new autonum_id automatically.

How do I inform the search engines of the move?
I contemplated creating a custom CI route to catch the old URI's, lookup the new ID and redirect, but am concerned that this might lead to a duplicate content issue since there would be mutliple url's with the same content. Many of the old listing id's are indexed in Google and other search engines.

Is there a way to use mod_rewrite to redirect to a script that looks up the new id and does a 301 Permanent Redirect? Would I need to create mod_rewrite entires with 301 redirects for every old listing (approx. 350 entries)?

Any suggestions would be greatly appreciated.

#2
[eluser]Rob Stefanussen[/eluser]
Sure, I see what you're saying, forgive me if this is over simplistic ...but the Google spiders are probably going to have everything worked out in no time ...I can't remember clicking on too many dead links from Google Smile

#3
[eluser]ELRafael[/eluser]
depends...

if the old links have a high relevance (sorry about my english), maybe google takes a long time to reindex!!

is better to put a redirect (old to new one)

#4
[eluser]Michael Wales[/eluser]
Well it looks like you already have all of the basic framework of your site completed. You definitely want to go with 301 redirects, but why make it more difficult on yourself?

A quick script that queries the database and outputs a new .htaccess file should take 3-5 minutes, if you drink a beer and do it blindfolded. Then it's merely opening your FTP client and sending it across the Interwebs.

#5
[eluser]Neovive[/eluser]
walesmd .. I was thinking of writing a quick throw-away script to generate the list of all 350 redirects and add this directly to the httpd.conf. Is this what you are referring to? Would adding 350 redirect entries have any significant perfoarmance impact on the server? Now I just have to factor in the beer and blindfolding ... Smile

#6
[eluser]Michael Wales[/eluser]
350/301 - I can never keep them correct in my head, whichever means a permanent change of location. Yeah - I would just write a quick script to output the .htaccess file to make that happen and upload it. That way your not doing 350+ entries by hand.

#7
[eluser]Neovive[/eluser]
Sorry for the confusion. There are approximately 350 listings in the database. I will use HTTP 301 Permanent Redirect. Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.