#mod_rewrite start here

RewriteEngine on

#does not apply to existing directories, meaning that if the folder exists on the server then don't change anything and don't run the rule!

RewriteCond %{REQUEST_FILENAME} !-d

#check for file in directory with .html or php extension 

RewriteCond %{REQUEST_FILENAME}\.php -f

#here we actually show the page that has .html or .php extension

RewriteRule ^(.*)$ $1.php [NC,L]

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