WordPress.org

Ready to get started?Download WordPress

Forums

How To Redirect Old Permalinks to New Permalinks using .htaccess? (5 posts)

  1. Aahan Krish
    Member
    Posted 3 years ago #

    Hello,

    I need to change the Permalink structure of my wordpress website...
    FROM: "/%post_id%-%postname%.html" (example: http://example.com/13659-sample-post.html)
    TO: "/%year%/%monthnum%/%day%/%postname%/" (example: http://example.com/2011/05/28/sample-post/)

    But the problem is, once it's changed, all the old links indexed on Google, linked by others etc become useless and throw 404 errors.

    NO PLUGINS PLEASE. Is there a way to redirect old permalink urls ("/%post_id%-%postname%.html") to ("/%year%/%monthnum%/%day%/%postname%/") using .htaccess??

    Hope you can help me on this one.

    Thanks.

  2. christogeretz
    Member
    Posted 3 years ago #

    How many pages? If it's only a few it's probably able to be done.

    Realistically, though - why not just install "Broken Link Checker" plugin, fix the links; let google crawl everything and you're all good.

    Next, to ensure that people following bad links to your website get treated OK, have a good-looking 404 error page that they'll be able to use to find what they're looking for easily!

  3. Aahan Krish
    Member
    Posted 3 years ago #

    More than 2900 pages, that's the reason why I am looking for a .htaccess directive. Help anyone?

  4. cyndi@yardi
    Member
    Posted 2 years ago #

    I need help with this as well.....can anybody help? Aahan did you get help yet?

    Thanks
    Cyndi

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    Please post a new topic.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags