Skip to content

Commit 4490851

Browse files
authored
Add fallback app config (#35503)
1 parent bf67c4b commit 4490851

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

aspnetcore/blazor/host-and-deploy/webassembly/azure-static-web-apps.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ uid: blazor/host-and-deploy/webassembly/azure-static-web-apps
1414

1515
This article explains how to host and deploy standalone Blazor WebAssembly with [Microsoft Azure Static Web Apps](https://azure.microsoft.com/products/app-service/static).
1616

17+
## App configuration
18+
19+
To ensure that requests for any path return `index.html`, set a navigation fallback route.
20+
21+
Create a file named `staticwebapp.config.json` in the project's root folder with the following content:
22+
23+
```json
24+
{
25+
"navigationFallback": {
26+
"rewrite": "/index.html"
27+
}
28+
}
29+
```
30+
1731
## Deploy from Visual Studio
1832

1933
To deploy from Visual Studio, create a publish profile for Azure Static Web Apps:

0 commit comments

Comments
 (0)