As Jai noted, I’ve switched the site over to PHP. That’s not the only thing I got done today.
Mark Pilgrim recently wrote another reminder that gzip-compressing web pages can save you some serious bandwidth. Unfortunately, this requires some magic with Apache which I can’t seem to cast. However, Dean Allen pointed out that you can use a PHP function to gzip-compress your site on the fly. Gzip compression is supported by pretty much all modern browsers that matter (ones that don’t support it are given a regular uncompressed web page, anyway) and can reduce your bandwidth by half. Spiff.
Speaking of Dean, his Refer tracker runs on PHP as well. In order for it to track page hits, though, you have to have a PHP tag in each of your documents. This isn’t a big deal with MT templates, but, in order to get it to work with my site, I either had to override my .htaccess file to process HTML files as PHP, or migrate to PHP entirely. I’m not allowed to modify .htaccess files with my web host, so that leaves me with the inevitable choice to migrate. It took about a half-hour to pound out all of the details. The end-result is visible over here.
The new URLs were an inevitable conclusion of moving to PHP. I mean, if I’m going to change my URL structure, may as well go all out, right?
In particular, I wanted to future-proof the URL structure from any future changes I might make to the site (like if I ported over ASP.Net or something–gack!). A search for future-proofing URLs in Movable Type brought me to Már Örlygsson’s helpful tutorial.
Finally, being a good netizen, I wanted to make sure all of my old inbound links still make it to their original content. I mean, not like I have a lot of them, so the ones that I do have I don’t want to disappoint.
What I did to solve this is create another Individual Archive simply called “Boing.” It uses the old URL structure (<$MTEntryID pad="1"$>.shtml) to create a page which then redirects the user to the new page with this meta tag:
<meta http-equiv="Refresh" content="0; URL=/archives/<$MTArchiveDate format="%Y/%m/%d"$>/<$MTEntryTitle dirify="1"$>/">
I thought about making this a temporary fix, removing it after about a year or so, but it’s relatively harmless in terms of disk space and just maintains itself. I mean, a couple hundred bytes of data per entry and it keeps Our Story from massive link rot.
All that being said, though, a big part of the reason I switched to PHP was that I want to get back into some sort of development again. Web sites and databases are pretty much all I get to work with these days, so I thought, “why not?” Make Our Story PHP-based and mess around and have fun. Who knows? Maybe I might even end up coding the Ironworks web portal by hand.