In September 2003 we emulated Mark Pilgrim's slugs -- short, easily-customized, cruft-free URLs. Doing so effected a rather negative change: our referlog -- a tool designed to store and display incoming referers -- no longer tracked individual archive pages. Why? Referlog retrieves visitors' referers via an SSI instruction located in each archive file. Files without the .html extension aren't parsed for SSI and, furthermore, can't be parsed as such using the common Apache server-parsed handler.
What to do about it?
It turns out that it is possible to parse files without an extension for SSI using the appropriately named Apache XBitHack directive, which is invoked by simply adding XBitHack on to your .htaccess file. The Apache tutorial, "Introduction to Server Side Includes," explains:
XBitHacktells Apache to parse files for SSI directives if they have the execute bit set. So, to add SSI directives to an existing page, rather than having to change the file name, you would just need to make the file executable usingchmod.
In other words, the XBitHack directive gets Apache to parse all executable text/html documents for SSI directives. Read that last sentence again because it contains the catch. This hack only works for documents served as text/html. Under our current configuration this means that referlog will track Internet Explorer users only; users of standards-conscious browsers, since they get proper XML documents, will not be recorded.
You may be wondering why you should care about a shortcoming in our referer tracking script. You shouldn't. But keep in mind that this means SSI is non-functional within all extension-less XHTML files served properly as application/xhtml+xml.
We'll admit it's a bit of an edge case, but it's not as though we needed more proof that embracing XHTML is a dubious adventure.