This document is available on the Internet at: http://urbanmainframe.com/folders/blog/20040717_a/folders/blog/20040717_a/
|
Tags:
I have followed a couple of discussions pertaining to URLs over the past few days.
As a result of various articles and their respective comments, I have made a few subtle changes to the URL schema of urbanmainframe.com...
It all started with "Slash Forward (Some URLs are Better Than Others)" over at A List Apart. This is an old article (22nd February, 2002) but as relevant today as it was when it was first written.
In the article Waferbaby tells us that, "a frequently overlooked step in [the process of building a website] is the structure of your links - the actual URLs you'll be using to point to items on your site."
Waferbaby advises us that URLs should feature a trailing slash and that technology-specific file extensions (".htm", ".php", ".cgi", etc.) should not be used. He furnishes us with two good reasons why:
One more issue that Waferbaby touches on is that web-server performance can suffer (slightly) when the trailing "/" is omitted.
Next came Mike Papageorge (fiftyfoureleven.com) who asked for advice on "Trailing Slashes Best Practise" while pointing out that there are many "inconsistencies amongst the ranks". Simon Jessey responded, telling us that he has "adopted a policy of always having the trailing slash". Jessey also pointed out that the highly respected Simon Willison advocates the trailing slash, which is a little strange since Papageorge had already highlighted Willison's weblog as one within which URLs don't always end with "/" (example)!
The upshot of all this is that I have begun the process of implementing URLs with trailing slashes on this website.
I have removed the extraneous requirement for urbanmainframe.com URLs to end with "/index.htm" and "/page_1.htm". Where these URLs were used previously, a simple "/" will now suffice.
Examples:
Note: The old addresses are still perfectly valid and remain functional. Links/bookmarks using the old schema will still retrieve the correct page - mod_rewrite will automatically rewrite them with the new variant.
Where documents span multiple pages, the "/page_x.htm" suffix is still required, for the time being.
I should point out that there are probably still modules in my CMS that use the old schema. Furthermore, there are many URLs that I haven't yet done anything with. I will revise these as and when I notice them, working towards 100% adoption of URLs without file-type extensions and ending with "/".
Naturally, I'll be keeping a lookout for 404 errors in my logs. However, if you find that I've broken something then please let me know, either in the comments for this article, or by email.