This is probably more of a server issue than an issue with React Router, but here is the scenario I'm stuck with:
When developing my app on my local machine, say I wish to navigate to the route /about
. So for example, I can enter localhost:3000/about
and hit enter, and the page will load and show the "about" component.
But after building the app and deploying it on my server, if the user physically types http://example.com/about
(assuming my site is example.com
) and hits enter in the URL bar, it returns the Server Error 404 - file or page not found error. How can I get it to simply load the about component instead of trying to navigate to an "about" page that doesn't exist?