# HSAI Admin - cPanel / Apache (generated by npm run build:cpanel)
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /HSAIV2A/

  # Next.js static assets (required)
  RewriteRule ^_next/ - [L]

  # Serve existing files and folders
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]

  # Map /login/ to login/index.html
  RewriteCond %{REQUEST_FILENAME}/index.html -f
  RewriteRule ^(.+?)/?$ $1/index.html [L]
</IfModule>

DirectoryIndex index.html
Options -Indexes
