Redirect Wordpress Posts to Drupal
If, like me you've migrated your blog / site from Wordpress to Drupal you will probably want to arrange to 301 redirect all your Wordpress links to their new Drupal equivalents.
The Redirect module can be used to handle the redirection, but you might want a way to automated the process of entering the redirects.
If so, what you need is the Redirect Import module along with a CSV file containing the old urls and the new ones.
You can create an appropriate CSV file automatically by joining the old Wordpress "posts" table to the new Drupal "node" table with the following SQL statement. The SQL statement will need a little editing for your configuration (and you need to make sure that your sql client can access both databases). This code assumes mySql but it will probably work on any other sql database. Standard disclaimer, take backups, run at your own risk and especially, don't come crying to me if something goes wrong...