WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm migrating a Typepad install to a Wordpress subdomain, and most of the links will be broken. The rewrites work so that:


is rewritten to


If a full link with article information is passed, it is rewritten as such;




I am looking for a way to feed the article title into Wordpress's search so even though the link is broken, it is easy for users with bookmarks find it.

share|improve this question
up vote 1 down vote accepted

You can try a plugin to do this:


Reads the page URL and tries to find a page/post that it might match and redirect to it.

Found out about this plugin from: http://www.aebeta.com/web-hosting/seo/7-seo-friendly-404-plugin-for-wordpress.html

share|improve this answer

Why not do a one-to-one redirect? When migrating the data over, add a custom field like '_legacy_url' in the WXR or whatever mechanism you're using to track the old URLs. Then, check during the template_redirect action for a one-to-one match whenever WP throws a 404.

add_action('template_redirect', 'typepad_redirects', 0);
function typepad_redirects(){
        global $wpdb, $wp;
        $url = esc_attr($wp->request);
        $result = $wpdb->get_row("SELECT * FROM $wpdb->postmeta WHERE meta_key = '_legacy_url' AND meta_value LIKE '%$url%'");
        $redirect_url = get_permalink($result->post_id);
             wp_redirect($redirect_url, 301);
share|improve this answer
I'm not exceptionally familiar with Wordpress, do you know where I could find additional information on this? – Alex Feb 3 '12 at 18:01
How are you migrating your content over? – Brian Fegter Feb 3 '12 at 19:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.