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

后端 未结 2 1120
醉话见心
醉话见心 2020-12-06 11:16

I have succesfully set up a static website on Azure Blob storage using the $web container as advised within the Microsoft documentation. In addition, I have def

相关标签:
2条回答
  • 2020-12-06 12:05

    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.

    0 讨论(0)
  • 2020-12-06 12:09

    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.

    0 讨论(0)
提交回复
热议问题