Client side routing for a SPA and static hosting

How can I make sure all URLs go to index.html for my React app, while using Replit static hosting?

My Replit:
https://replit.com/@AlexCris1/Boodi

Example 404:
https://boodi-ai-alexcris1.replit.app/chat

But this works:
https://boodi-ai-alexcris1.replit.app

I created a _redirects file and copied it into my dist folder during build time, but that didn’t seem to work.

You cannot do this easily, if at all on static deployments.