I have the following in my .htaccess file:
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+[^/]) $1.html [L]
When I request "/test/foo" and the file "/test.html" exists, I get an internal server error. It should be giving me a 404.
Why does the rewrite condition evaluate true? The directory "/test" does not exist and the file "/test/foo.html" does not exist, so the -f should return false. It seems like mod_rewrite is appending .html to just the "test" part of the path and testing that.
Any ideas?