some WordPress pointers …

Ok folks, after wrestling with permalinks and mod_rewrite, I’ve deciphered a number of well-scribbled Post-Its to give you some pointers on how to ‘tune’ your WP blog.

Firstly, your Apache build needs to include mod_rewrite – if it doesn’t, fix this then come back here. mod_rewite is required to enable permalinks and improve the aesthetics of your URI so instead of a messy URI that includes references to hard-coded page entries in MySQL database e.g. …/blog/index.php?p=xxx, you get a nice URI referenced by the title of your post e.g. …/blog/my-post/. Permalinks also create a more constant reference for search engines/RSS feeds, especially if you intend to reindex or change the underlying database of your blog later.

Problem 1: Permalinks do not appear to work.

1. Check your Apache httpd.conf (in /etc/httpd/) and make sure that within the ‘Directory’ tag, Allow Override is set to ‘All’
2. Check for existence of a .htaccess file in your blog directory, if not create one by touch .htaccess
3. Make sure .htaccess has correct permissions, chmod 666 .htaccess should do the trick
4. Go back to WP admin, and under Options/Permalinks, select a template tag for your structure – if you’ve done all the above, WP should edit the .htaccess automatically.

Problem 2: Trailing slash is missing in the header URI.

This is a really irritating problem. In WP 1.5 (upwards), the trailing slash has been removed (ostensibly for consistency!) such that when you click on the header hyperlink to take you back to your blog’s index.php page, you get a 404 error instead. There are a couple of ways to fix this:

1. add the trailing slash yourself in themes/header.php wp-register.php and wp-login.php (not very elegant since this requires constant changes if you use multiple themes)
2. add a ReWriteRule in your .htaccess file as follows:

ReWriteEnginge On
ReWriteBase /your-blog-directory-name/
ReWriteRule you-blog-directory-name /your-blog-directory-name/index.php [L] *** add this line

What this does is everytime Apache gets a URI request pointing to the directory of your blog with a missing trailing slash (if there’s no /, Apache thinks you’ve requested a file rather than a directory), the rewrite rule appends /index.php to the URI, thus avoiding the 404 error. The [L] then tells the rewrite to stop after executing this rule.

Tomorrow, I shall tackle themes to improve the ‘look’ of my WP blog but for the moment, this blog has been imported into WP from


mini in name only …

Success … I think. My Mac Mini is now purring handsomely beside the plasma and is configured as an auxiliary Apache web server, but armed to the teeth naturally with the usual power tools – Postfix mail, php, MySQL and Webalizer (to name but a few). I’ve also added WordPress to the arsenal and got as far as hosting a test blog before turning to post this writeup – in a word, this Tiger is bitchin’ .

But here’s the million dollar question: is OS X simpler to use than Windoze? Well, ummm … maybe. Tiger’s brill when you’re doing noddy everyday stuff – and some of the cool things like widgets, Sherlock and RSS integration into Safari really put Bill’s HCI team at MS to shame – but the advanced stuff is not for the faint hearted and for this reason, it is well hidden from the user. So much so I’ve had to delve deep into the subconscious to dredge up what few nuggets are left from previous UNIX encounters to work around some challenging installation problems. Fortunately, I located this guide before resorting to hari kiri.

The bottom line … I’m a *very* happy bunny and with OSXvnc installed, I’ll be taking this little pussy to bed tonight, albeit remotely on my Windoze laptop. The Mrs, on the other hand, is not so thrilled about the idea … ;o)

toys & boys …

Two cool things will happen next week: my Mac Mini is scheduled to be delivered on Wednesday and we’ve got tickets for the opening of Star Wars III: Revenge of the Sith on Thursday. Not surprisingly, the boys are hyper with anticipation for the latter, and the Force is unmistakably strong in their rooms: Lego bricks that once lay lifeless in ambush of parental feet (why is it they hurt so much when you stand on them?!) have been restored into impressive battle crafts as the boys re-enact the scenes from Hoth, Besbin and Geonosis with the usual cacophony of whizz, bangs and pops comensurate with the intensity of the conflict. As for me, I intend to chill in front of the telly with the Mac (I’m plugging the Mini into the DVI of the 42″ plasma to achieve the holy nirvana of 1920 x 1200) and do lots of hand-waving (using the wireless air-mouse from Gyration while unravelling the delights of the new Tiger OS. Ummmm, just can’t wait …

how mayors are made …

Last night, I attended the mayor-making ceremony in Calne … which in itself was quite an experience not only because of the civic insignia on show (the robe and chain looked very nickable) but also the enactment of some age-old traditions, the significance of which, I’ll wager, would have been lost on many of those present. For example, while many of the cast were in character – the newly elected mayor positively beamed with pride and had an air of resolution about her as she took her oath of office, and the Mace Bearer naturally looked menacing – the presence of the particularly charming High Sheriff of the County who turned up in tights, sporting a rapier on his hip was totally lost on me. It didn’t help when he introduced himself and declared that he also used to be the executioner. Ummm, end of that converstion! But, I need your help to satisfy my curiosity on a small matter: why does an incoming mayor need to make a declaration of a chaplain, in what is predominantly a secular, municipal appointment. If you know, answers on a postcard, please.

third time lucky …

Well done everybody who voted yesterday … it seems the turn out was more than in 2001, well at least when postal votes are taken into consideration and we all know how wonderful that system is don’t we?! Anyway if you didn’t already know, Tony’s Labour government is back in power with a greatly reduced majority of about 66-ish seats and already, the media vultures are circling over Downing Street, hoping to see early bloodshed resulting possibly in the present occupant of No 11 moving in next door.

So congrats to Tony and commiserations to Oonagh King who lost her seat to the vociferous George Galloway in Bethnal Green. Isn’t it ironic that he should fight this crusade some 700 years after the last Knights Templar hung up their swords … and for the opposite side! Yes, the war on Iraq was a contentious and divisive issue, yes lots of innocent people were killed and many continue to die, and yes, there may have been clandestine cabinet meetings prior to full parliamentary disclosure of the legality of the ‘invasion’ – but in the end, as Tony said himself, *we* have the luxury of debate but as our leader, *he* had the obligation of decision making. Just ponder a while on this little quote, “The genius of a good leader is to leave behind him a situation which common sense, without the grace of genius, can deal with successfully“.

Me, I voted with my heart and not my head. But For whom? Now, that would be telling wouldn’t it?! I’ll give you a clue – it wasn’t Tony 😉

countdown to polling day …

Something really likes the taste of me … within 2 hours of carrying out the customary Spring May Bank Holiday hack of the garden, I’m now covered head to foot in large, red and incredibly itchy spots which I assume must be insect bites of some sort. I’ve slapped on the hydrocortisone big time – so much so, it feels like a second (and possibly third) layer of skin has started to grow under the lumpy spots … eeeeeuwww! My colleague Joe reckons I should hit the booze before I next venture out into the garden, so that I can “take the bastards out” if the little buggers have the misjudgment and/or audacity to prick me again. Ummm, interesting theory … and one I should put to the test regardless, especially after discovering this fabulous wine blog.

Otherwise, life goes on in sunny Wiltshire in the lead up to polling day on Thursday. The letterbox flap continues to rattle from the incessant posting of election leaflets, while the UK media continues to bang out more protracted questions for the electorate, in a pathetic and transparent attempt to *make* news. I particularly liked the latest theory suggesting that the nation as a whole is suffering from election fatigue and rather than admit to the social faux pas of apathy, we have collectively decided to sit on the fence with the “I haven’t made up my mind” excuse. Call me a cynic, but I reckon the media has turned this into an election for the statisticians rather than for the politicians; personally, I’ve learned more about poll trackers, swing-o-meters and seat arithmetic than the half-baked promises that the parties have to offer. As someone said on the radio this morning, it would be far simpler to split a chicken in half, chuck its entrails out on the patio and read what the future holds for this great nation – it’s how the Romans used to do it, you know … and look what happened to that empire 😉