I have a single page application deployed on www.domain.com and I need to serve www.domain.com/robots.txt.
I'm still using the React Router 0.13.x.
So the problem is I need to serve up a static file and the router is catching all URLS and I get an warning: _Warning: No route matches path "/robots.txt". Make sure you have
I can't create a handler for it because I have nothing to render, I just need to serve a static file.
How can I serve the robots.txt file in combination with the router?
React Router 0.13.x isn't supported anymore.
But you need to make sure your server is configured to catch any URL _after_ it's configured to serve from a directory. This isn't a router problem, it's a server config problem.