Azure CDN controls engine to overwrite default document and remove .html extension

I would like to use the azure blob and CDN premium features , but the documentation is very rare . This is something quite doable on Amazon S3 / CloudFront.

For clarity, I want *.azureedge.net/sample/index.html to be *.azureedge.net/sample/ and *.azureedge.net/sample/test.html equal to *.azureedge.net/sample/test

This is completely incomprehensible and requires "up to 4 hours" to preview the changes, so ...

azure rules engine

After some research, Azure has a wrapper for the Verizon Edgecast CDN, and this page looks just like their ...

+7
url-rewriting azure azure-storage-blobs azure-cdn
source share
2 answers

Edgecast support gave me the following rules:

enter image description here

  • add new IF rule Always
    • Function
      • Rewrite URL - source ((?:[^\?]*/)?)($|\?.*) $1index.html$2
      • Rewrite URL - source ((?:[^\?]*/)?[^\?/.]+)($|\?.*) $1.html$2

I created the npm package to expand the folder and subfolders in the azure storage, see https://github.com/glued/yokai there is more information about setting up CDN for pure URLs here: https://github.com/glued/ yokai / blob / master / azure.md

+10
source share

I hesitate to post this as an answer. I did not have enough time to actually try, but I found what seems to be the instruction manual for the rules for Verizon CDN.

GlobalDots Knowledge Base - Edgecast Advanced HTTP Rules

The PDF manual has a link at the top.

HTTP file rules guide

This is not like regular expressions. It is as if in the spirit of pattern matching, but does not look so powerful or universal.

I have not tried it yet. It seems like you need to slightly decrypt the documentation to use. There are not many practical examples, and few of them leave me more questions than answers. I would like to hear how you dealt with him.

+2
source share

All Articles