yep, regular expressions are just plain cool.
I noticed (to my horror) that Google didn’t seem to be indexing my archives since changing to the PHP query model back on July 2. A quick bit of poking around in the Apache documentation and mod_rewrite turns out to be the solution. I’m now masking my PHP queries as static page URLs. Old permalinks still work, but now Google should be finding a lot more to index around here.
In case anyone is wondering, I added the following line to my web root’s .htaccess file:
RewriteRule ^archive/(.*) /notes/notes_archive.php?a=$1
That matches anything after “archive” (and stores it in $1) then plops it onto the end of the existing PHP query. Adding a [R] to the end of that would send the altered URL back to the client, omitting the [R] masks the url.
That was much easier than I was expecting.