Dec 7, 2003
Arrr. I’ve just thrown away an hour or more trying to get around the nuisance of my host’s configuration. First of all, my problems could be solved entirely by
mod_rewrite, an extremely useful module. Alas, my host only has mod_rewrit, which is some strange psuedo-module with no existing documentation. Turning on
.htaccess just causes mayhem. Why is this is a problem? Read on.
I happen to be a stickler for nice, stable URLs that are not named arbitrarily according to the technology underneath the surface. I’m in strong favor of URLs like
http://mysite.com/topic/subject/, not like
http://www3.foobaz.org/~dfink/stuff/display.jsp?id=2342&filter=true. The former, provided it remains in existence, conveys meaning just through the URL. Only important semantic elements are present here. The second example, is a mess, with GET variables, the content depending on
.jsp, and a bunch of other trivia that does not belong.
Unfortunately, it is not feasible to create web pages for every single instance in your database, otherwise what is the point of your DB? So, single page scripts that act as a portal to tons of content via the DB are necessary. The smoothest way to fix this problem is using
mod_rewrite. With a simple rule, URLs of the form
/journal/entry/123 could be seamlessly mapped to
/journal/display.php?id=123 behind the scenes; the user would bookmark
I’m strongly considering other hosts.