Vite: On Live Server, Fix React Router Page 404 on Refresh

maxralph1
TRIAL

a year ago

On localhost, my React app works just fine using BrowserRouter.

But as I try same app on a Live Server, I get an error page on Refresh.
Please, how can I fix this?

In anticipation, thanks for your help.

0 Replies

maxralph1
TRIAL

a year ago

N/A


a year ago

copy the nixpacks.toml and Caddyfile from this repo into yours.

if applicable, remove any custom build or start commands you may have set in the service settings.