When Cruft Free = Migraine

February 17th, 2007

I am very close to fixing my problem of changing incoming URL requests like :

http://blurbomat.com/archives/2004/12/23/hot_pants_mama

to

http://blurbomat.com/archives/2004/12/23/hot-pants-mama/

I found a sweet Movable Type template here that does some great work. You substitute your Individual Entry Archives with a PHP file and rebuild your site and boom, good to go. Problem for me? I decided to follow “best practices” and “good usability” to “hide the technology” from “visitors”. English translation: My URLs don’t play well with others because they don’t have an extension like .php or .html. So the sweet Movable Type template only works on redirecting old incoming URLs to the new ones if the incoming request is for:

http://blurbomat.com/archives/2004/12/23/hot_pants_mama.php

which doesn’t work in my case, because I chose to be nice. And stupid. So now my dilemma is this: how do I add a .php to URLs coming in to an old entry like:

http://www.blurbomat.com/archives/2002/11/13/dog_day_morning

and make the server put a .php on the end so it looks like his:

http://www.blurbomat.com/archives/2002/11/13/dog_day_morning.php

which will then be handled by the sweet Movable Type template and then handled by WordPress. How, oh great internet? o

UPDATE: Solved this mofo. Thanks to Tobyjoe, Jon and an understanding wife.

Here’s how I did it:

I put an htaccess file in my archives directory after I replaced the Individual Entry template with code from here. I then built the individual archive files from within Movable Type. These files refer to the newer site structure that WordPress provides. I hadn’t used static files in a few years on blurbomat, so this was a fun experience to see real live files on the server. Once the files were up, it was a matter of putting the right htaccess code into the right directory.

He-Man Epilogue Special Moment of Learning: Apache is a little wonky with dynamically generated content. This is very good knowledge for me going forward, but it was a lot like a root canal.

UPDATE: Something is now dorking my feed. Sweet.

UPDATE: Fixed. All these updates are for personal future use.


This entry is filed under tech. You can follow any responses to this entry through the RSS 2.0 feed. You may leave a response. Pinging is currently not allowed. Please read the Terms of Service before leaving a response.

3 Responses to “When Cruft Free = Migraine”

  1. 1
    matt Says:

    Sounds like you’ve got it handled, but if you run into any more bumps in the road let me know, I added my AIM to my profile.

  2. 2
    leahpeah Says:

    i know exactly who your hot_pants_mama is.

  3. 3
    jon deal Says:

    Glad to see that it’s working!

    I came here via an “underscore” address and it automagically changed them to hyphens.

Leave a Reply

You must be logged in to post a comment.



Copyright 2001-2008 Armstrong Media, LLC. All rights reserved. Terms of Service. This is the paranoid section of the site.