Out of the box, Single Page Application (SPA) handle what we call soft 404. When you deploy to Netlify, we will see a page like this one:
To avoid that, it is as simple as adding a _redirects
file in the public
directory of the application and adding the following:
|
|
This lets the SPA handle the 404 as a soft 404.
See this forum thread for more usecases.
Credit: banner image by Erik Mclean on Unsplash