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

  1. relaxedguy
    Posted 9 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:

    Current URL in WP:

    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:

    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
    Posted 9 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
    Posted 9 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
    Posted 9 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic