(I haven't tried your second suggestion, but I fixed it)
Some FREE Knowledge to Googlers out there:
The Apache version matters! When you scan through the documentation, MAKE SURE you see stuff for the Apache version you have.
My problem was that I used PLESK for everything. This block on vhost.conf:
<IfModule mod_rewrite.c>
RewriteEngine On
# Rewrite /foo/bar/ to /foo/bar/index.php
RewriteRule /([^.?]+)/$ %{REQUEST_URI}index.php [L]
# FIX: If request_uri is just the domain name, then redirect to index.php.
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule /(.*) %{REQUEST_URI}/index.php [L]
# Rewrite /foo/bar to /foo/bar.php
RewriteRule /([^.?]+)$ %{REQUEST_URI}.php [L]
# Return 404 if original request is /foo/bar.php
RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
RewriteRule .* /error [L,R]
</IfModule>
was working like a charm.
BUT on CentOS/Apache 2 it just didn't. The problem was the slash at the beginning and Apache's auto-trailing-slash-adding (a gift from the newer versions). This auto-trailing-slash-adding was not woprking when a script was name /file and there was and a dir named /file/.
So I added these 2 lines:
<IfModule mod_rewrite.c>
RewriteEngine On
**DirectorySlash Off**
# Rewrite /foo/bar/ to /foo/bar/index.php
RewriteRule **^/?**([^.?]+)/$ %{REQUEST_URI}index.php [L]
# FIX: If request_uri is just the domain name, then redirect to index.php.
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule **^/?**(.*) %{REQUEST_URI}/index.php [L]
# Rewrite /foo/bar to /foo/bar.php
RewriteRule **^/?**([^.?]+)$ %{REQUEST_URI}.php [L]
# Return 404 if original request is /foo/bar.php
RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
RewriteRule .* /error [L,R]
</IfModule>
How cool is that?