RewriteEngine On

# If the request is NOT a real directory
RewriteCond %{REQUEST_FILENAME} !-d

# If the file with .php extension exists
RewriteCond %{REQUEST_FILENAME}.php -f

# Internally rewrite to .php file
RewriteRule ^(.*)$ $1.php [L]
