WordPress.org

Ready to get started?Download WordPress

Forums

MT to WordPress and Google (6 posts)

  1. DmitriVonKlein
    Member
    Posted 10 years ago #

    Hello,

    I'm in a process of redesigning my site and in doing so decided to see what wordpress is all about. So far I'm very pleased however there is one major concern for me.

    My new link structure will be:

    /2005/01/mac-mini

    However Google has me indexed under

    /2005/01/15/mac_mini/

    How would I go about constructing a rule in .htaccess to route from old links to new?

    Regards,

    Dmitri

  2. Brak
    Member
    Posted 10 years ago #

    /%year%/%monthnum%/%day%/%postname%/

    In your options/permalinks section "structure" field.

  3. iJames
    Member
    Posted 10 years ago #

    Try adding this one to what you've already got:
    RewriteRule ^([0-9]{4})/?([0-9]{1,2})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?/?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&name=$4&page=$5 [QSA]

    (All you're doing here is including a regex for the day field, but then ignoring it and going straight to $4 for the name. Functionally equivalent to *not* having it and using $3 for the name.)

    - iJames
    http://www.invisiblejames.com

  4. DmitriVonKlein
    Member
    Posted 10 years ago #

    Thank you very much, however I'm not sure how to deal with dash(in new structure) and underscore(in old structure), thats the main issue I'm attempting to resolve.

  5. carthik
    Member
    Posted 10 years ago #

  6. DmitriVonKlein
    Member
    Posted 10 years ago #

    I'd like to thank everyone for their help!

    This plugin got the job done

    http://idly.org/2004/05/13/fixing-mt-urls-for-wp

    Actually I just plugged it into my-hacks.php instead.

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.