calvinmicklefinger - 12:17 am on Jun 7, 2010 (gmt 0)
This is what I wound up with. It seemed to simplify a lot of things and handles a lot of different situations. Please remember, I aren't no coder, so I hope it is bug proof. Please advise if it amn't.
In my .htaccess ...
# Rewrite URL request for example.com/p<num> to script at /index.php?page=<num>
RewriteRule ^([A-Za-z0-9]+)$ /index.php?i=$1 [L]
In my index.php ...
$var = strip_tags($_GET['i']);
Seems to work so far, and handles malformed or missing pages if the file is missing.
What you think?