Just add .htaccess file to the root folder of your site(for example, /home/domains/domain.com/htdocs/) with following content:
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.phpFirst, verify that the mod_rewrite module is...