RewriteEngine On

# 1. Standardize by stripping trailing slashes if they aren't real directories
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# 2. If the request is for a real directory or file, serve it directly
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]

# 3. Handle the internal mapping to the .html file securely
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^([^\.]+)$ $1.html [NC,L]

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