WhiteHouse.gov Goes Drupal

My favourite piece of open source CMS software has added another significant scalp, with http://www.whitehouse.gov making the switch to Drupal.

The move has been orchestrated by Dries himself, through Aquia, along with some third party contractors based in the US. (More details and specifics are available via techPresident).

Much is being made of the Obama administration, or at least some aspect of it, making the “open source choice”. With a foot in each camp (both the closed and open source worlds), I have to wonder if the move is significant and, in a way, I hope it isn’t.

Much is being made of the choice as if it represents some fundamental decision by the US Government to chose open source for reasons other than it being the best technical solution. Dries has a great take on why this is the case, and I wish more of the news articles out there were picking up on these points.

As an advocate of Drupal, and of open source in general, it being chosen because it is the best solution is the only option that I can support … because it is the only option that takes open source forward.

Chose open source because it has a better cost/benefit balance, chose it because it is lower risk, more secure, or chose it because it fits your needs. But don’t chose it because it is open source, because that’s the same as choosing it because it is Microsoft or Google or Sony or any other brand name.

If we can make the playing field cost, risks, time, and function and eliminate the FUD peddled by others, then products and platforms like Drupal will be the best fit, will be selected, and the presence and market share of open source will improve.

But please, let’s not turn a victory dance into an awkward “Dad at a wedding” moment on the grave of some unknown closed source system. It is unbecoming of us all.

Drupal in 57 seconds

As the “tech” side of the blog is heating up, and there is a good chance that there will be a lot of Drupal posts over the coming months, I thought it would be worthwhile linking to this really cool video from Ping Vision

What is Drupal? … in 57 seconds | pingVision.

They definitely explain Drupal faster than I can, and it is a lovely example of some kinetic typography at the same time.

Migrating from Drupal to WordPress without losing indexation

Moving this site from Drupal 4.x to WordPress 2.7, I was obviously concerned with losing indexation of my old Drupal URLs from search engines.

As I had not set up clean URLs on my Drupal website for a lot of my content, I needed a quick and easy way of ensuring that any traffic destined for one of my Drupal pages firstly found it’s way to the original content (as not everything has moved over to the new site) and secondly informed my users that the site had been moved.

Enter the 301 redirect, the safest way to redirect both users and search engines.

As I was not using clean URLs, the majority of my Drupal hits where coming in the form http://www.planetofthepenguins.com?q=node/… . It’s the q= that’s key – WordPress doesn’t use this parameter and so I can safely assume that when I see it, it means the browser wanted a page from the old site.

So, having pointed a new subdomain (http://old.planetofthepenguins.com) at my old Drupal site, the code to perform the automatic redirection is simple …

<?php
$drupalq = $_GET['q'];
if ($drupalq){
header(“Status: 301 Moved Permanently”);
header(“Location:http://old.planetofthepenguins.com?q=” . $drupalq);
exit;
}
?>

This code

  1. Grabs the “q” parameter from the URL into a variable
  2. Checks this variable and if it has been set
  3. Writes a 301 redirect to the HTTP return header
  4. Writes a location into the HTTP return header
  5. Prevents the rest of the page from being rendered

All that remains now is to put a prominent message on my old site that I have moved to a new platform and provide my users with a link to click.

Oh, and set up my Permalinks in WordPress!