So I insert following code in my apache.htaccess file in order to remove www and php.

Whats wrong here?

This is my whole file

Code:
ErrorDocument 500 /500.php
ErrorDocument 404 /404.php
 
# force non-www domain
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]
 
#RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [QSA,L]