RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

# Explicitly allow access to PHP files
<FilesMatch "\.php$">
    Require all granted
</FilesMatch>

# PHP Version handler for cPanel (no changes needed)
<IfModule mime_module>
    AddHandler application/x-httpd-alt-php80 .php .php8 .phtml
</IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
