HTTP for HTML Authors, Part III - HTML with Style | 3
By now I must have convinced you that designing proper URLs is a very important factor in designing a useable Web site. But how do you go about doing it? Most of the time, this is not something you can do in HTML. As we discussed in the first part of this series, the way URLs are mapped to documents depends on the configuration of the particular Web server you're using. However, most modern Web servers allow you to customize the procedure so that the URL can be completely independent of the actual mechanism used to produce the document, whether that is reading a file from a hard disk or running a program and producing the output.
The first thing you need to do is get rid of file suffixes like .html, .gif, .jpg or .asp. Configure your server so that it can decide the type of a document depending on its content or location, not its file suffix. Make sure you can run the programs that produce your dynamic pages without referring to anything specific to the technologies they use.
Next, try to make everything in your URL have human meaning. This means doing away with numbers (troubleshooting, which refers to the section of a manual on troubleshooting, is better than chapter7.html, which refers to the same section but might have to change if the new version of the manual contains a different number of chapters before this one!), any kind of indexing key and using symbolic, meaningful names.
Now try and make your URLs as short as possible. Although shorter URLs are good, they're not always best. You might want to avoid abbreviating “news” to “n” in case you want a section called “navigation” later on.
Produced by Stephanos Piperoglou
Created: March 15, 2001
Revised: March 16, 2001