I’m running a Blazor standalone application. When we set up the routes, these work fine within the confines of the SPA, but if you copy one of the links and try to go straight to it via your browser, you’ll likely see a failure such as a 404.
We can make changes to implement this by adding a staticwebapp.config.json file to the wwwroot folder (or where your app_location points to in your Azure workflow/pipeline file if using this for deployment).
Here’s an example
{ "navigationFallback": { "rewrite": "/index.html" } }
Without the fallback route the browser simply tries to access your route as if’s it’s a web page on the server. With this file, we essentially fallback to index.html which then let’s Blazore route to the correct location.