Hosting SPA with Static Website option on Azure Blob Storage (clean URLs and Deep links)
I think I found a solution
- Add a new rule
Condition: URL file extension
a. Operator: Less than
b. Extension: 1
c. Case transform: No transform
[This basically means that the URL requested has no file (extension) but is a route of the app which will be taken care of by the app routing]
Action: URL rewrite
a. Source pattern: /
b. Destination: /index.html
c. Preserve unmatched path: No
- Save rule
.
Kudos to Andreas Wendl at https://github.com/MicrosoftDocs/azure-docs/issues/43257#issuecomment-580668444
Here's a simpler / possibly more correct solution:
- leave
/static/*
be - rewrite everything else to
/index.html
So, index.html is served in response to deep links like /users/
and let's say /users/alexa.siri
.