Just a Theory

By David E. Wheeler

Blosxom Rewrite Rules

I finally got my mod_rewrite rules working for Blosxom, so now it finally looks like I have a real site! The problem was that %{REQUEST_FILE} wasn’t actually the full file name on the file system, but the request URI! I have no idea why, but once I figured out this problem I was able get ‘round it by using %{DOCUMENT_ROOT}%{REQUEST_URI}. So now my configuration looks like this:

<VirtualHost *>
  DocumentRoot /usr/local/www/doc_roots/justatheory
  ServerAdmin david@justatheory.com
  ServerName justatheory.com
  ServerAlias www.justatheory.com
  CustomLog /usr/local/www/logs/access_log.justatheory combined
  <Directory /usr/local/www/doc_roots/justatheory>
    AddHandler cgi-script .cgi
    Options +ExecCGI
  </Directory>
  RewriteEngine on
  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
  RewriteRule ^/(.*)$ /blosxom.cgi/$1 [L,QSA]
</VirtualHost>

And all is well. Now, if only I could get the meta plugin working properly…

Looking for the comments? Try the old layout.