<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  # 1. If the requested file or directory physically exists (e.g. images, css, js), serve it normally
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]
 
  # 2. Otherwise, route all other frontend routes to index.html (React Router)
  RewriteRule ^ index.html [L]
</IfModule>
