Mod Rewrite rules


I'm setting up a section on XEUS to post source and examples from articles I write for magazines. I wanted to make it somewhat automated so I didn't have to regen pages for each article. I just wanted to drop a tarball in someplace and let my system take care of it for me.

Part of this process involves writing a PHP script to that will show the magazines and the issues I've written for plus the article data. I wanted one script to handle all magazines. And I wanted visitors to be able to do articles/magazine/issue instead of some goofy looking GET command. Turns out this is pretty easy with mod-rewrite, the Apache module that maps an URI to another URI before sending back the results. A couple of simple rewrite rules (made up of regex's) solved this problem. Users see the ordinary /path/stuff URL in their browser but it gets processed via a PHP script that processes the input like a GET request.

This isn't online yet because I'm still tweaking the PHP script. I also need a PHP script for dropping the tarballs on the server and unpacking them. But this is all pretty straight forward stuff. I just need some time to finish it up.