Enable SPA-routing for sub-folder

Hello, by default the wrangler pages dev routes every 404 to index.html.

I have a /subfolder/index.html with a SPA router ready.

When yo visit /subfolder/my-spa-route it falls back to ./index.html instead of /subfolder/index.html.

How can this be solved?

Maybe a redirect in _redirects ? But couldn't figure it out.
Was this page helpful?