I'm migrating a site (posts and content) from Drupal to WordPress. All the links need to remain intact and point to newly appointed links in new categories etc. via 301.
This is for the purpose of keeping the PageRank and backlinks intact.
I have succesfully imported all the posts and assigned new categories (for reference, using this great post). Only now I'm stuck with two seperate challenges:
1. The old URL's still need redirecting. I believe this can be done using .htaccess and creating Rewrite rules using some good RegExp. Only this is the tricky part:
always has: http://www.oldsite.com/node/5424
and has this permalink in Drupal: http://www.oldsite.com/catching-big-fish
or sometimes this structure: http://www.oldsite.com/article/catching-big-fish
Needs to be redirected to:
The /node/ ID's from Drupal comply with the WP post ID's (?p=5424) so maybe I can use that as a starting point. Does anyone know of a good .htaccess Rewrite rule for this?
2. I want to use this permalink structure: /%category%/%postname%/ but there is a problem: The slug it automatically generates from a post title doesn't always work. F.e.: I have a "/" in a post title and it automatically creates a slug with an extra slash, thus the link won't work. The same with "?" in the title. Makes the created permalink not work.
Would be great if anyone could shed a light on this.