Website Rewrite for Search Engine Optimisation

September 30th, 2007

No, not this one. I’ve spent the weekend rewriting a jewellery website to make it ridiculously Search Engine friendly using mod_rewrite and anything else I can think of. It all came about when I asked a client of mine how she was doing with her Google Adwords and it transpired the site needed an overhaul – so away I went.

Since I’ve been practising SEO on this site and sharing info with K on the subject, it was fairly easy to start from scratch and put together the product category and viewing structure that was required. Every page in the category section has URLs that are rewritten from:

    http://domain/Retail/Silver_Necklaces/Silver/Pearl/

to

    http://domain/products.php?a=Necklaces&b=Silver&c=Pearl

This means the Search Engines see the former, but my script is the latter and much, much easier to work with. Best of both worlds? Yes, but it requires a lot of though into how to structure your RewriteRules and even what order to place them in.

OK, so the page URLs can be fancy schmancy keyword-laden affairs, but you have to generate them as well, so a local version of Apache is essential because you don’t want to be configuring and restarting it on a live server in the hope that you got it right first time. It doesn’t help that I have no real clue how Regular Expressions work, either – most of mine are copy/paste.

And it’s Sunday – what the hell?

Dell Returns and the 2001FP LCD Monitor

September 19th, 2007

A few month ago I had a purple and green bar appear the full height of my monitor. It was independent of any screen resolution since it appeared in the same place and at the same size every time, and was quite obviously a fault with the monitor. The problem I had was that it was intermittent – the worst kind of fault.

For the past few days I’ve had the ‘Son of Scanlines’ back with me. Without fail, a green bar vertically on the screen, full height, will appear every time the monitor is first switched on. After 30-60 minutes it would fade out, but was easily reproduced by allowing the monitor to go into standby mode and waking it up again. It’s no longer an intermittent fault, and since the monitor comes with a 3yr warranty, it’s time to get it replaced.

I emailed Dell not without some trepidation, since the last time I attempted a warranty return on my laptop they just weren’t interested, fobbing me off with as many excuses as possible. I took pains to test the monitor under as many conditions as possible: the same monitor on a different computer; another monitor on the regular computer and even the same monitor on a different computer via VGA instead of DVI. All results were the same – the band of green appeared whenever the monitor was used.

So I emailed Dell, but even that was tricky since they require a system service tag in order to identify the system they’d sold me. Since I had bought the monitor as a standalone item, I didn’t have a service tag. Since I didn’t have a Case Number already, I couldn’t use the ‘Unresolved Issues’ form. In the end, while examining my original Dell Invoice, I found the address UKI_Customer_Care@Dell.com and used that.

To my pleasant surprise I received an email from Dell the next day, basically confirming my suspicions about the monitor and asking for contact and delivery information to arrange collection. I promptly emailed the info, and the monitor is to be collected on Friday.

So the first tip: Be sure to test as fully as possible because Dell will only ask you to do it anyway. If you test as much as possible and leave no get out, things will go much more smoothly.

Update: Wednesday, 12:29.
Received another email. From the sound of it, they’re sending me another monitor out and picking the old one up at the same time which seems like awfully good service on their part. We shall see.

Update: Thursday, 08:35.
Confirmed – they’re dropping off a replacement at the same time as picking up the duff one. I’ve emailed to confirm if the monitor stand is required as well (since it’s quite weighty). The duff unit is all boxed up ready to go and M has her instructions. So far, Dell have been pretty flawless. Dammit.

Update: Friday, 11:30.
SURPRISE! Dell managed to send me a different monitor completely. Instead of the 2001FP I have a 2007FPb waiting for me. A monitor so elusive that the only pictures I could find of it were on a chinese blog. And of course, it looks nothing like my other monitor. Great!

Sigh. I’ll email Dell back and see what they say this time.

Update: Tuesday 25th, 08:36.
After thinking about it over the weekend, and receiving an offer from Dell of a 2001FP in exchange, I’ve decided to keep the new monitor and buy a second 2007FP to match. As far as I can tell, the 2007FPb is a model in the 2007FP product range, so they should be identical. My current 2001FP is just out of warranty, sadly, so I’ll probably stick it on eBay.

Bye bye 2000, Hello XP

September 15th, 2007

Another month passes, another format of the big machine. This time I’ve upgraded to Windows XP – something I swore I’d hold off from doing as long as possible.

It came about because I had to do some video editing and K was using Pinnacle Studio to great effect. I bought version 11 and found to my initial dismay that it was XP and Vista only. After weighing my options I figured it wasn’t going to kill me to finally ditch Windows 2000, and ordered the XP OEM CD from eBuyer.

Installation went well, as expected, though I personally disliked having to activate my copy of Windows as soon as it was installed. My first action was to get rid of the standard XP interface and go back to the Windows Classic style I was used to – everything else I think I can live with.

I confess I did cheat somewhat in getting Apache, PHP and MySQL installed and working. I simply made a backup of my existing folders (complete with MySQL data) and config files and, after installing so as to get the services running correctly, I simply copied the folders back over, pausing only to drop php.ini and the hosts file into their respective folders. Total install time, 10 minutes.

All that is left to do now is to upgrade the videocard drivers and find the WinTV install disc, then set up the system to my own preferences.

Stephen King – Misery

September 6th, 2007

Something that’s been bugging me for years is the end of Stephen King’s otherwise brilliant book, Misery, which wasn’t repeated in the film starring James Caan and Kathy Bates since the relevent scene was changed anyway.

In the book, Paul Sheldon wakes from a drug-induced sleep to find himself tied to the bed. Annie enters, makes a speech about hobbling and promptly chops Paul’s foot off with an axe.

At the end of the book, Annie has crawled out to the shed and has her hand wrapped around the handle of her chainsaw. This smacks of a last-ditch attempt to get a little bit more horror into it, and is tacky as a result – I think it would have been much more effective to have had her going for the axe again since she’s already used it on him once.

That said, she also cut off his thumb with a carving knife, didn’t she? Maybe it’s an escalation of hostilities in retaliation for being smacked in the head with a typewriter.

How to Flush the DNS Cache on BlueQuartz

September 4th, 2007

Imagine you’ve just added a new domain to your BlueQuartz server. It was previously on another IP address and you’ve added the relevent DNS entries on your box, changed your nameservers and the new site shows up in your browser – great, all as expected.

But then you check email delivery and find that, while email from outside the server is being delivered, anything generated on the server, or send via that server’s SMTP, is being sent off to the old IP address. The problem you have is that your server is caching the old DNS entries until they expire.

In Linux, DNS Caching is handled by the nscd process. To restart this process, and thus flus the DNS cache, you’ll need to type one of the following while logged in as root:

    /etc/rc.d/init.d/nscd restart    (for general Linux, or... )
    /etc/init.d/nscd restart         (for BlueQuartz)

You may find that this doesn’t work, in which case, try using ’stop’ instead of restart, ping your domain name from the server, then use ’start’ to restart the service. Your updated IP address should now show up.