We recently did a migration from a "custom CMS" (coded from scratch) to our current technology news/reviews site, MuyComputerPRO, which we installed in WordPress a couple of weeks ago.
The migration process has been long and complex, and we are now facing the colateral damage: old-duplicated URLs (more on this later) don't work, giving a 404 error page.
The old CMS generated URLs dinamically, and those permalinks weren't permanent. The last part of the link was a alphanumeric code that also could change from article to article, so the same webpage could have several different URLs. I know. I arrived here late.
We have managed to get the "last" permalink that was assigned to each article, and we have setup this permalink as the one used on WordPress after a database migration. This way, each of the old articles have at least a good URL that Google already knows about.
The problem is, the rest of duplicated URLs are lost, and Google Webmaster Tools has noticed this and gives a report with thousands of 404 errors on those duplicated links (our database has over 12.000 articles).
I think the only solution to this is to create 301 redirections. Our web server is Nginx, and althoug I've investigated how to accomplish this in Nginx, the current solutions don't fit well in our model.
Examples of a bad/duplicated URL:
And the good one is
As you can see, the final code is the one that must be changed, and I fear there's no "general" 301 redirection rule for that.
Will we have to specify ONE BY ONE the bad and good URLs? We could that (there's a Wordpress plugin, called Redirection, that let's you do this in a simple way), but it would be a little hell :(