Migration Pages to Workers
Hi everyone, I need some help with a routing issue after migrating from Cloudflare Pages to Workers.
I'm currently migrating my React application from Cloudflare Pages to Cloudflare Workers, and I'm facing a problem with routing.
When I access the root URL (e.g., /) everything works perfectly, and I can navigate through the app without any issues — all internal routes are found correctly.
However, if I try to directly open a nested route (e.g., /dashboard or /about) by entering the URL in the browser or refreshing the page, I get a 404 error.
It seems like the Worker is only set up to handle the root route, and doesn't know how to serve the app properly on any other route.
How can I configure my Worker to serve my React app correctly on all routes, not just the main one?


7 Replies