Downtime

17th September 2007

Just a heads-up. Tomorrow, this site is being moved to a new server and so is going to be down for most of tomorrow from around 10:00 (GMT) to late evening.

Upgrade time

26th February 2007

Just a quick note to warn you that the server that akrabat.com runs on is going to be upgraded tomorrow, so expect serious downtime as we see what happens when you go from FC-old to FC6 !

All should be back up and running by the evening though!

New Theme

14th January 2007

Thought, I'd have a go at understanding WordPress themes! The image at the top is an actual road sign on my way to work, which has unfortunately been removed by the council.

If you see anything broken, let me know please as I've only actually tested this in Firefox! (I know it's broken in IE…)

Wordpress 2.0 Rewrite Rules

18th January 2006

We recently upgraded my wife's blog from WordPress 1.5 to 2.0 and it broke the mod_rewrite rules used to support the legacy Movable Type urls. When she migrated from Movable Type to WordPress, we moved to /{year}/{month}/{day}/{slug} type urls from the default Movable Type rule of /archives/{id}.html. We read the manual at the time and put the following into the .htaccess file:

RewriteRule archives/0*(d+).html /index.php?p=$1
RewriteRule index.rdf /index.php?feed=rdf
RewriteRule index.rss /index.php?feed=rss
RewriteRule index.xml /index.php?feed=rss2

and all was well…

Then we upgraded to WordPress 2.0.

They stopped working because WordPress 2.0 does it's own mod_rewrite. I worked my way through the source code and modifed the core stuff and got it working. Then I started trying to find out how to do it properly without modifying the WordPress source code. I finally found a post on the support forums from someone trying to do something similar and modifed the solution to work for me:

Add the following to a file called functions.php in your theme directory:

function mt_filter($rules)
{
    $rules['archives/0*(\d+).html']
                = 'index.php?p=$matches[1]';
    $rules['index.rdf'] = 'index.php?feed=rdf';
    $rules['index.rss'] = 'index.php?feed=rss';
    $rules['index.xml'] = 'index.php?feed=rss2′;
    return $rules;
}
add_filter('rewrite_rules_array', 'mt_filter');

and that's all there is to it.

Fairly obvious I would think if you know how WordPress works. There's probably a very handy article somewhere on wordpress.org detailling this, but I couldn't find it… probably didn't look hard enough!

Is this thing on?

23rd January 2005

Akra's DevNotes is where I intend to write about my development life. In general this means that I'll be talking about PHP coding as that's what I do most of my development in at the moment.

I currently work for Campbell Shaw and also do a little bit of freelance work for my old company to help them out maintaining code that I wrote for them. In my spare time, I am (slowly!) writing some plugins for CMS Made Simple, a remarkably easy to use Content Management system.