I have the following mod_rewrite rules set up:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
This works fine, allowing me to use "nice" URIs (like www.mysite.com/about instead of www.mysite.com/about.php.
However, when I have both a directory and a file with the same name (for example /products and products.php, this breaks as apache just redirects to the directory. Is there a way to fix this?
Thanks,