Options -MultiViews
RewriteEngine On

# If file or directory exists, serve it directly
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Handle admin routes - redirect to admin subpath if accessing root admin
RewriteRule ^admin/?$ admin/ [R=301,L]

# For all other requests within admin path, serve index.html (SPA routing)
RewriteRule ^ index.html [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
