I used wp2drupal a while back and have had terribe results trying to get the old WP urls to map to Drupal.
The main idea was to use .htaccess with a RedirectMatch directive that sent anything that looks like an old WP url to a script.
I kept the old WP table with slugs and dates, so the script tries to match the date from the old slug with a blog post in Drupal with the same date.
The MySQL query goes:
SELECT node.nid from wp_posts JOIN node on wp_posts.post_date_gmt=from_unixtime(node.created) WHERE wp_posts.guid like '%oregonlibraries.net/staff/?$uri' OR wp_posts.guid like '%oregonlibraries.net/staff/index.php/$uri;
I set $uri from %ENV{'REQUEST_URI'} (er, in Perl).
I never really got it working, I think because I couldn't set up the .htaccess rules to allow for all of the various formats of wordpress urls I used over those few years.
staff/?.*
staff/p=[0-9]*
staff/.*
Part of my problem is that staff/.* matches a lot of non-blog posts on the site.
I ended up making the drupal 404 page include a search box and, nowadays, if I remember to look, I check the error logs and add aliases for old posts in the URL alias module.
I would love for someone to improve on this idea and/or show me how to do it right!
I used wp2drupal a while
I used wp2drupal a while back and have had terribe results trying to get the old WP urls to map to Drupal.
The main idea was to use .htaccess with a RedirectMatch directive that sent anything that looks like an old WP url to a script.
I kept the old WP table with slugs and dates, so the script tries to match the date from the old slug with a blog post in Drupal with the same date.
The MySQL query goes:
SELECT node.nid from wp_postsJOIN node on wp_posts.post_date_gmt=from_unixtime(node.created)
WHERE wp_posts.guid like '%oregonlibraries.net/staff/?$uri'
OR wp_posts.guid like '%oregonlibraries.net/staff/index.php/$uri;
I set $uri from %ENV{'REQUEST_URI'} (er, in Perl).
I never really got it working, I think because I couldn't set up the .htaccess rules to allow for all of the various formats of wordpress urls I used over those few years.
staff/?.*
staff/p=[0-9]*
staff/.*
Part of my problem is that staff/.* matches a lot of non-blog posts on the site.
I ended up making the drupal 404 page include a search box and, nowadays, if I remember to look, I check the error logs and add aliases for old posts in the URL alias module.
I would love for someone to improve on this idea and/or show me how to do it right!