Archive for May, 2009

Create Your Own TinyURL Service for Wordpress

I don’t particularly like using URL shortening services. I think I first noticed them getting used rather prolificly in the Guardians technology section to include lots of random links to bizarre web content. TinyURL’s own web site wouldn’t particularly inspire me to go ahead and make use of it either. But, because of my own use of services such as twitter, I’m forced to shrink down links to get within those 144 characters.

Herein lies a problem – If said URL shortening service disappears, all my links are broken to all that interesting content I worked so hard to find. Not good.

In order to our bit to help, a number of developers and even services have taken action in order to make sure they provide alternatives for the links over which they’re responsible.

I’ve installed a plugin here which uses the recently puchased domain “woot10.eu” to provide alternative links using the code <link rev="canonical" href="shorter link" />. My full ianwootten.co.uk domain does not lend itself well to be able to provide a shorter URL on the same domain unforunately.

There is a whole huge discussion on the approriateness of using this technique (mainly) due to the rev attribute not being included in the HTML5 spec. See the comments in Chris Shifletts post for more on this.

Anyway, Duncans plugin takes the id of any wordpress post and coverts it to base 36 (instead of 10) and offers up the alternative in the header of each post. I believe the conversion could go all the way up to 62, if php’s base conversion actually supported the use of different cases in conversion.

In my own case, I’ve had to forward the links from woot10.eu across to www.ianwootten.co.uk using a .htaccess file so that the plugin is actually able to pick them up.

Now when you visit:

http://woot10.eu/p8p you’ll be forwarded on to the longer URL such as http://www.ianwootten.co.uk/2009/05/15/my-vicious-circle-of-posting-quality-content.

This isn’t particularly useful if you want to find the alternative for URL, as you’ll have to hunt through the source of a post. For that I’d suggest Simons bookmarklet which looks for an alternative link, or creates one if it doesn’t exist using tinyurl. As an aside, there looks to be an interesting talk on the canonical attribute and link element by Matt Cutts of google here.

Tags: , ,

2 Comments

My Vicious Circle of Posting Quality Content

I’ve been looking back at the posts on this site and the commitment that I supposedly made (internally) a couple of months ago about posting regular, interesting content. But it seemed to die a death very promptly.

I think that there may be a bit of a vicious circle here (in my own situation at least). I’d love to post regular interesting stuff, but for that to happen I need to feel that it might be read. By far the most commented stuff here is when I link up code. Those posts take a fairly substantial amount of time for me to complete as they are born of the result of my own frustration of hours spent tinkering with code, which I think might be useful for others to be clued up on. I also need time to gather my thoughts and structure what exactly I’m trying to say to people. This all adds up.

If I post more often, I fear the lesser quality of content might be pretty boring for the majority of people and probably not at all worthy of feedback from them. So I end up in a kind of stalemate position – should I post this/shouldn’t I/Oo-er and I don’t do anything. I’m not saying that I have a massive amount of visitors here, I’d just like them to enjoy the experience when they visit.

Tags: , ,

7 Comments