React-router not working after deploying vite react project

I deploy vite react project successfully, however navigation and page refresh is not working as it return error 404. how do i resolve this?

2 Likes

Hey,

Have you configured any re-write rules as described in our documentation [https://render.com/docs/deploy-create-react-app#using-client-side-routing]? It’s important to note that, by default, any request to a path other than the root path will fail on static sites, as those URLs are not handled or captured by default.

Regards.
Jérémy, Render Support

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.