<IfModule mod_rewrite.c>
    RewriteEngine On
    # Add the .php extension if the requested file exists
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}.php -f
    RewriteRule ^([^\.]+)$ $1.php [NC,L]
</IfModule>
