• ethanoringel

    (@ethanoringel)


    Hello all,

    I have done a handful of htaccess redirects within the same wordpress blog, but am stuck on this one. I am trying to figure out how to redirect a URL from an old blog using the Serendipity cms to a new blog on WordPress, same domain.

    The old blog permalink structure is:

    blog.com/blog/index.php?/archives/postID-post-name.html

    I want to redirect to the new blog at the same domain:

    blog.com/postID/post-name OR
    blog.com/year/month/day/post-name

    I’m pretty solid with it up to a point, but each option hits a dead-end for me… so here are my questions:

    1) The post ID option seems ok b/c I can grab the postID from the serendipity permalink structure, but when I migrate the content to the wordpress blog the post IDs will all change. Is there a way to manually increment the post ID using htaccess? For example: if the post ID for a post in serendipity is 25 and the new post ID in wordpress becomes 45, and this happens for every post, can I simply add 20 to every old post ID using htaccess?

    2) Or, is there a way to use htaccess to insert the “/year/month/day/” structure from the posts once they’ve been migrated into wordpress? Htaccess would have to grab that info from the wordpress database and insert it into the permalink… Is that possible?

    I am kinda stuck, so any help would be appreciated.

    Thank you!

The topic ‘Htaccess redirect: permalink from old CMS to WordPress – help!’ is closed to new replies.