I’m a real glutton for punishment, and because I felt like relaxing this afternoon, I decided to teach myself how to administrate Apache’s mod_rewrite. What the module does isn’t really relevant to this post — let’s just say it has no bearing on you or any other end-user’s online experience whatsoever, and leave it at that.
Anyway, I spent two hours writing one line of code this afternoon, which I will summarily cut and paste here, in all its arcane glory:
RewriteRule ^blogs/(.)([^/]+)/?(.*) blogs/$1/$1$2/$3 [R]
Wahoo! It’s black magic, baby! My voodoo > your voodoo!!!111
Man, I should really stop typing now … I’m starting to salivate all over my keyboard.
(NOTE: Although it looks like a bunch of over-enthusiastic Korean chat glyphs strung together at random, that Unix incantation above actually does something: it’s a text-substitution command that rewrites URLs as they’re requested by site visitors. Farkin’ amazing, that is.)
