I want to implement the coding below in my website, to shorten the urls.

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
However, I tried implementing it without result. For example.. when I type: www.mysite.com/products it takes me to my hosts main page instead of www.mysite.com/products.php (which exists).

My complete coding:
Code:
# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
The rewritebase line was allready in the htaccess file, im not sure whether to remove it since there is a warning stated.

How come the url shortener doesn't work?