# php handler
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php83 .php .php8 .phtml
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On

# Serve specific HTML pages BEFORE checking for static files
RewriteRule ^login/?$ /login.html [L]
RewriteRule ^register/?$ /register.html [L]
RewriteRule ^about/?$ /about.html [L]
RewriteRule ^themes/?$ /themes.html [L]

# Allow direct access to static files and directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Fallback to index.html for SPA routes
RewriteRule ^$ /index.html [L]
</IfModule>

# Disable directory listing
Options -Indexes

# 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
