WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Maintain permalinks when moving from Movable Type (4 posts)

  1. relaxedguy
    Member
    Posted 7 years ago #

    Attention mod_rewrite gurus. I moved from Movable Type to WP recently and want to preserve permalinks.

    Here's my original URL in MT:
    http://onlinedatingpost.com/archives/2005/12/20/vivox_the_next_big_thing_in_online_dating.php

    Current URL in WP:
    http://onlinedatingpost.com/archives/2005/12/vivox_the_next_big_thing_in_online_dating/

    I need to remove the day portion from the middle of the url and strip the .php suffix from the end. I will use mod_rewrite and .htaccess to do this (Is there any other way?)

    This is a good url to learn more about how to do this:
    http://adamstiles.com/2005/10/painless_switch_from_typepad_to_wordpress/

    However, the actual code for what I want to do in the .htaccess file eludes me.

    Can someone put together the code I need to place into .htaccess? I'm sure many other people would like to know how to do this. Both url structures are as I understand it "out of the box" configurations.

  2. relaxedguy
    Member
    Posted 7 years ago #

    Something like this?
    RewriteRule /archives/([0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/.*)\.php http://onlinedatingpost.com/archives/$1/$2/$4/ [R]

  3. relaxedguy
    Member
    Posted 7 years ago #

    This does exactly what I wanted in Apache 1.3.33, which is running on my laptop, but fails with a 500 error at my host, which is running Apache 2.0.46.

    Something changed with the mod_rewrite rules between versions of Apache, can't figure out what's wrong, anyone have any idea?

    RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(.*)\.php$ http://onlinedatingpost.com/archives/$1/$2/$4 [R]

  4. relaxedguy
    Member
    Posted 7 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic