# Apache Server Configuration for React SPA + PHP Backend

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /captainsmartforpresident2028chatapp/

    # Allow direct access to the backend folder
    RewriteRule ^backend/ - [L]

    # Route all other requests to the React app's index.html
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.html [L]
</IfModule>
