Brainstorms and Raves - Mobile

skip to navigation

More on Friendly URLs
04:26 PM - Sep 28, 2003

Friendly, lasting URLs are easy enough to manage when you create the site architecture and URLs yourself, but with the increasing popularity of weblogs and content management programs there’s been increasing interest in what can be done to ensure friendly URLs that can be permanent regardless of programs used, changing servers, or changing programs. Today’s post looks at a few possibilities and pitfalls with Movable Type.

Movable Type’s URL Approach

One of the many reasons I switched to Movable Type is its ability to customize the URLs; however, as wonderful as Movable Type is, even Movable Type doesn’t yet have a separate field for the entry URL. The default uses the entry ID, but a certain amount of customizing is possible, including using the entry title.

Many have come up with helpful hacks and workarounds, but these may still rely on using one of MT’s other fields, especially the entry title field or the keywords field.

MT’s Default Entry ID for Entry URLs

Using MT’s default Entry ID to generate your entries' permalinks can be a nightmare as soon as the webhost’s server upgrades or if you change webhosts, both of which are common. When MT is installed on the new server all the entry IDs can change which in turn changes all your entries' permalinks. That, of course, breaks all the links to any of your entries and can mess up your search engine rankings.

Unfortunately, many people don’t find out about this nightmare until after the fact when they’ve got a huge mess on their hands.

Using Keywords for Entry URLs?

I’ve written about using keywords before, such as in my post last month, Movable Type Entry URL Choices. I’m using keywords to generate URLs for other portions of this site, but I haven’t used them for my weblog post URLs. Mark Pilgrim is using keywords to generate his URLs, and it seems to work fine for him.

This approach does indeed give the user control over the entry URL. I’m hesitant to use that approach for my entry posts, however, because of potential problems if you want to use keywords for other things, such as to help the MT Search feature. As I mention, though, this can be a very good solution for some, and I do use it elsewhere, just not for my weblog posts.

Using Dates for Entry URLs?

Using dates for entry post URLs may be the safest approach for the moment, and they do indeed have some meaning to human eyes, too. I’ve been impressed with Már Örlygsson’s Howto: Future-proof URLs in Movable Type, and I’ve followed most of his suggestions. However, I also wanted to use meaningful words for the entry URL.

Entry Title for Entry URLs?

As I mentioned, I’m following most of Már Örlygsson’s future-proof URLs in Movable Type suggestions. The exception is that instead of using the time for the entry URL I’ve been using the entry title. My solution has been a compromise, though, as I’m still using another MT field—the entry title field—to generate part of the permanent URL.

The advantage to this approach is that it provides meaningful words for the entry URL, which I prefer. That has made it worth the compromise to me; however, I haven’t been totally happy with this, either.

The disadvantages:

Prior to launching the redesign of my site using Movable Type I looked around for plugins or scripts to allow me to even use just the first couple of words of the entry title, but I came up dry.

There are ways to generate a specific number of letters but not the number of words, at least not without using PHP or other scripting that my ISP doesn’t support. This could prevent the entry URL from getting too long, but it also cuts off words right in the middle of them. An example of this is at Nick Bradbury’s Typepad-based weblog. Click on some of the permalinks and check out the URLs and you’ll see what I mean. This approach solves the dilemma of entry title-based URLs getting too long. The meaningful words are compromised, though.

Keyword Field Compromise for Entry URLs?

Dave Dribin has just created a Movable Type plugin solution that seems like the best of everything to me for right now, his new Movable Type Short Title Plugin. This plugin utilizes the keywords field but it only uses the words that you place within brackets.

For example, this is what I’ve used to create this entry’s URL:

[URLs]

If you look in your browser’s address bar you’ll see the result following the date:

.../urls/

I can still use the keywords field for any other purpose without altering the entry’s URL. The keywords within the brackets are also still available for other uses, too.

So if you’re going to use keywords for your entry URL, Dave’s new plugin is the way to go.

Using Dave’s Short Title Plugin, if you don’t put any keywords within brackets, the entry title will be used for the URL. You can read all the details at his post Fixing Movable Type’s Permalink URLs and download the Short Title Plugin from his website.

For now this is what I’m choosing to utilize. The ideal, though, is for MT to provide a dedicated URL field so that we don’t have to create hacks and workarounds using other MT fields.

Dave’s Index Patch

While you’re at Dave’s site, also check out his new Index Patch, too. It allows MT’s archive index templates to use a directory index rather than the page name, such as /archives/ rather than /archives/index.html.

Related Entries

top

[Home: Mobile · Main]
[Mobile Archives: 2008 · 2007 · 2006 · 2005 · 2004 · 2003 · 2002 · 2001 · 2000
All years (one page)]
[Main Archives]

Copyright © 2000-2008 Shirley E. Kaiser, M.A., SKDesigns. All Rights Reserved.