Forums

changing post slug (6 posts)

  1. Sushubh
    Member
    Posted 1 year ago #

    i want to change the post slug from:

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

    to

    /%postname%/

    how do i forward old links to new ones?

  2. Viper007Bond
    Member
    Posted 1 year ago #

    I'm thinking this will work:

    RewriteRule ^archives/([0-9]{1,4})/([0-9]{1,2})/([0-9]{1,2})/(.*)$ http://sushubh.net/$4 [QSA,L]

    I'm a bit rusty with mod_rewrite, so it may need tweaking.

    And make sure to put this somewhere ABOVE # BEGIN WordPress and that RewriteEngine On is somewhere above this new rule.

  3. Sushubh
    Member
    Posted 1 year ago #

    does not seem to work :P

  4. Sushubh
    Member
    Posted 1 year ago #

    http://www.deanlee.cn/wordpress/permalinks-migration-plugin/

    this one seems to work... let me try for a few days

  5. Sushubh
    Member
    Posted 1 year ago #

    now can anyone suggest me some code that i can test run in phpmyadmin to check if any of the post slugs clash with each other? :)

  6. chmac
    Member
    Posted 1 year ago #

    This feature went into core in 2.3. So it will do it automatically. See this post for more info.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags