# SPA fallback for client-side routing (React Router) under /common-ui/sre_gpt/.
# Without this, reloading a deep link like /common-ui/sre_gpt/investigation
# asks Apache for a literal file/directory named "investigation", which
# doesn't exist, so Apache 404s before React Router ever gets a chance to
# handle it client-side. This rewrites any request that isn't a real file
# or directory to index.html instead, letting the SPA boot and route it.
#
# Copied verbatim into dist/ on build (Vite copies public/ as-is) and
# deployed alongside index.html by .github/workflows/prod-deploy.yml - no
# workflow changes needed.
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /common-ui/sre_gpt/
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /common-ui/sre_gpt/index.html [L]
</IfModule>
