I use Linode for web hosting. I like it because from an administration perspective, I effectively have a dedicated Linux box. In reality it is shared, so I pay a lot less than the cost of dedicated with the same amount of freedom. Up until Saturday, this server was running a very old Gentoo build that I never bothered to update. Performing this update was good, but had unforeseen consequences.
Before the update, the server was running a build of Gentoo from 2005. It was also running PHP4, a very old MySQL version, and a very old Apache 2. Now I have it running a new Ubuntu, lighttpd, PHP5 and new MySQL. All in all, there isn’t a noticeable change in how fast the server loads pages. However, there is a huge increase in security, ease of administration. I’m also sure the server can now perform much better under a heavy load than before, although the old build did handle quite a Digging without a hiccup.
Also, before performing the upgraded, I assumed it was a project that would take a day or two. Mostly thanks to the awesomeness of Ubuntu and Linode, porting all the web apps over took only a handful of hours. Completely rebuilding a web server from scratch and restoring all existing services in just a few hours, without any data loss, is pretty amazing. The only hitch I ran into was when I couldn’t finish a MySQL dump because the partition with the old build ran out of space.
Despite all this good news, there was one hitch. You see, this blog actually started running on a perl-based CMS known as blosxom. It’s still around, but nowadays it has a hard time competing with the likes of WordPress or Drupal. Anyway, Blosxom had a very elegant URL structure. When I originally switched to WordPress, I had to create an htaccess file and use mod_rewrite to keep that existing URL structure and not break every link to my blog.
Now that I have switched from apache2 to lighttpd, htaccess is no more. All the clean URLs for this blog are gone in favor of the ugly WordPress defaults. Every link to a specific article on this blog, including all the ones from my recent Digging, are broken. I could, if I wanted to, recreate the functionality of the mod_rewrite htaccess in a lighttpd configuration, but I just don’t care. I added a configuration to set the WordPress 404s to work, and that’s it.
This does bring up an interesting point though. URLs are largely determined by the web application and the web server working in tandem. If you want to move your site to a different platform, its a huge pain in the ass to keep the same URLs. This problem is largely unsolved. You’re pretty much either going to write lots of regex rewrite instructions to always keep your old schema, or you’re going to make broken links all across the web.
All in all, I think its best to just change and move on. The sooner you give up on the old, the sooner links will right themselves. If anyone out there has permalinks to any stuff on this site, feel free to update them.