I have a website built with react, which uses react-router. For some route I want to serve another page or static file, but since all request are forwarded to react router, its
Use Switch combined with a NoMatch component, combined with webdeb's solution:
NoMatch
window.location.reload()} />
This will match routes, show 404 if no valid href exists, and show a file or something if it's a valid href.