: Changing mod_rewrite "file exists" checks to not see directories as files I have the following mod_rewrite rules set up: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php
I have the following mod_rewrite rules set up:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ .php
This works fine, allowing me to use "nice" URIs (like mysite.com/about instead of 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,
More posts by @Reiling115
1 Comments
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.