Apache2 mod_rewrite and %{REQUEST_FILENAME}
I’m trying to develop a new website to increase my php object oriented skills. For this new website, I want every request for any url that doesn’t match a actual file on the disk to be redirected to index.php (to handle parameters in fact). Easy with apache2 rewrite rules : [cc lang=”apache”] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^/(.*)$ /index.php?rt=$1 [L,QSA] [/cc] This means : if the requested file is not a real file, and isn’t…