RewriteEngine On

# Ensure the directory exists and the request is not for a directory
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.*)$ $1.php [L]
