Hi, I have a single page application deployed on netlify and so far, everything is great. I’ve deployed it with a netlify.toml file with some redirects, one of them being:
[[redirects]] from = "/*" to = "/index.html" status = 200
The thing is, that when I try to submit a /sitemap.xml url to google search console, google says it cannot find the file, and when I try the file url in my browser I get redirected to /index.html.
So the question is, how can I serve my single page application while maintaining direct access to existing static files on the root folder? I have the same problem, for example, with /robots.txt.
It would be nice to redirect to /index.html only if the requested static file is not found.
Hint: If I issue a curl command to /sitemap.xml it gets served correctly, but not on the browser.