Keith Devens .com |
Monday, December 1, 2008 | ![]() |
| "Yes, it's terribly simple. The good guys are always stalwart and true, the bad guys are easily distinguished by... – Giles (BtVS: Lie to Me) | ||
|
| ← Semaphores | Leaving for summer school → |

Reverend Jim (http://revjim.net/) wrote:
Keith (http://www.keithdevens.com/) wrote:
No, old links will just be (permanently) redirected to the new links.
It's kind of funny, actually... I have a script in my CMS that does nothing but translate from old weblog URLs to their replacements, since I've changed URL formats so many times.
Buddha wrote:
Couldn't you simply use the simple numeric date system and an incrementor ad the link, a la: 20030524-1 or somethign like it. I it would remain short and be equally as descriptive as all your slashing and actual month naming. As far as the actal naming of the post, I am not sure why you would do that if it would be so long. A solution for that is to simply truncate the string to some manageable number of letters, or remove all articles or some other list of words.
Keith (http://www.keithdevens.com/) wrote:
Couldn't you simply use the simple numeric date system and an incrementor ad the link, a la: 20030524-1 or somethign like it.
I could, but I'd lose the "directoryness", which is important, because
All point to different parts of the archive, by year, by month, and by day. By the way, I used to have a system sort of like that, and of course, the URLs still work... http://www.keithdevens.com/weblog/2003-05-23. But I chose to move away from it.
As for the incrementor, that's just a pain in the ass to implement. To make a post identified by the order in which it was posted that day... I don't like it for a bunch of reasons. I did consider it, and was figuring out how to make it work while at the same time making the post id work (so, /2003/May/23/3901 and /2003/May/23/01 would both point to this post). So... say numbers less than 100 would point to the order within the day, and numbers greater would always represent a post id. But you can't be absolutely certain that you'll never have more than 99 posts in the day, so you still have to do some checks (not to mention the first 99 posts, though I could choose to start numbering at 100). Plus, what happens if you delete a post? An ID and name still uniquely represent that post, but the order would change. Unless I stored the order in the database when the post is first saved, but the point is that this is all a pain in the butt
. For numeric identifiers (as opposed to names), I just went with keeping the ID and forgetting about an "order within the day" identifier.
As far as the actal naming of the post, I am not sure why you would do that if it would be so long.
Well, everything I do from now on will be short. I'm willing to live with silly long names for old posts. Some are short though. It was really cool to see search engine hits get forwarded from http://www.keithdevens.com/weblog/3715 to http://www.keithdevens.com/weblog/archive/2003/Apr/07/PandaDog
A solution for that is to simply truncate the string to some manageable number of letters, or remove all articles or some other list of words.
The database only stores names up to 50 chars. That's still very long for names, but I tried to find a number that wouldn't cut off the names for too many existing posts (50 only did 8 posts -- 45 did 18, 40 did 45, 35 did 92, 30 did 197, and 25 did 441). I would have chosen 25 or 30 if I were starting from scratch, I think. But, I think the solution I chose was an ok compromise.
Probably the most important reason for the URL change was consistency. Rather than having all my URLs be /weblog/archive/2003... etc. except for my posts, now my individual posts are consistent with that too. Plus, fundamentally, weblog posts should be dated in the URL.
Anyway, that's my rationale.
Keith (http://www.keithdevens.com/) wrote:
Actually, I just updated all the names again and replaced lots of articles and other common words like you suggested. So, for instance, the name of this post went from "ImAboutToUpdateMyWeblogURLs" to "UpdateWeblogURLs". Much better.
Mean Dean (http://www.healyourchurchwebsite.com) wrote:
Thanks for the tips -- I'm about to do the same.
A.Sleep (http://www.asleep.net/) wrote:
I just did the same and use /CCYY/MM/DD/ as my index where if just CCYY is given all entries for said year will show, if CCYY/MM is given all entries for said month in given year will show, etc. Works very well.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.211s.
(Used 8 db queries)

Will old links be broken?