Hosting SPA with Static Website option on Azure Blob Storage (clean URLs and Deep links)

I think I found a solution

  1. Add a new rule
  2. 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]

  3. Action: URL rewrite

    a. Source pattern: /

    b. Destination: /index.html

    c. Preserve unmatched path: No

  4. Save rule

Screenshot.


Kudos to Andreas Wendl at https://github.com/MicrosoftDocs/azure-docs/issues/43257#issuecomment-580668444

Here's a simpler / possibly more correct solution:

enter image description here

  • 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.