# React Router handles application URLs such as /xyzpanel and nested pages.
DirectoryIndex index.html

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Serve existing static files and directories directly.
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Missing build assets must remain 404 rather than returning HTML.
    RewriteRule ^assets/ - [L]

    # Let the client router resolve all remaining application URLs.
    RewriteRule ^ index.html [L]
</IfModule>
