Geekuprising.com Logo
Home Youth Debate About Us Clients Services Technologies Code
You are here:: Code > Blosxom > Blosxom mod_rewrite rules
spacer
Browse

Blosxom Rewrite Rules

I've become more familiar with blosxom and I've realized you can create static blog entries via a scheduled task. This will write your entries directly to the filesystem and make them search engine friendly by design. If you want a completely dynamic blosxom site AND have search-engine friendly URLs, the rewrite rules below are pretty handy.

So. A brand-new blosxom installation. I'm an apache/perl geek (among other hats I wear) and I don't really like the default URLs. . .mainly because of aesthetics and partially because of search-engine friendliness. This isn't a smite on the author(s), just the way it is.

So I did some behind-the-scenes httpd.conf tweaking to apache via mod_rewrite to have all my blosxom URLs start from the "root" (/) rather than the perl script (/cgi-bin/blosxom.cgi)

RewriteEngine On
#Any other paths you don't want handled by blosxom.cgi
#setup like the "/images" directory
RewriteRule ^/images/ - [L]
RewriteRule ^/(.*) /cgi-bin/blosxom.cgi/$1 [PT]

Then you need to update the $url variable in blosxom.pl to be something like "http://www.yourdomain.com/"

Discuss this Article!

Copyright 2004 © Geekuprising Internet Consultants