calvinmicklefinger - 4:26 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 ...
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 missing pages. But, as you say, it could run phpinfo.php if I accidentally wind up with it in my root.
I don't know enough code to understand the globals you are using ... What do you think I can do to make this better? How can I protect against things like code injections?