问题描述
我想使用azure blob和CDN 高级功能,但是文档非常稀疏.这在Amazon S3/CloudFront上完全可行.
I would like to use azure blob and CDN premium features but the documentation is very sparse. This is something totally doable on Amazon S3 / CloudFront.
为清楚起见,我希望*.azureedge.net/sample/index.html
等于*.azureedge.net/sample/
和*.azureedge.net/sample/test.html
等于*.azureedge.net/sample/test
For clarity I want *.azureedge.net/sample/index.html
to equal*.azureedge.net/sample/
and *.azureedge.net/sample/test.html
to equal to *.azureedge.net/sample/test
这完全不清楚,需要最多4个小时"来预览更改,所以...
This is totally not clear and takes "up to 4 hours" to preview changes, so...
经过调查,Azure有一个Verizon Edgecast CDN的包装器,此页面看起来与他们的包装相同...
After some investigation, Azure has a wrapper for Verizon Edgecast CDN, and this page looks identical to theirs...
推荐答案
Edgecast支持为我提供了以下规则:
Edgecast support gave me the following rules:
- 添加新规则如果始终
- 功能
- URL重写-源
((?:[^\?]*/)?)($|\?.*)
目标$1index.html$2
- URL重写-源
((?:[^\?]*/)?[^\?/.]+)($|\?.*)
目标$1.html$2
- add a new rule IF Always
- Feature
- URL Rewrite - source
((?:[^\?]*/)?)($|\?.*)
destination$1index.html$2
- URL Rewrite - source
((?:[^\?]*/)?[^\?/.]+)($|\?.*)
destination$1.html$2
我创建了一个 npm包,以将文件夹和子文件夹部署到Azure存储中,请参见 https://github.com/glued/yokai 此处提供了一些有关为清洁URL配置CDN的其他信息: https://github.com/glued/yokai/blob/master/azure.md
I created an npm package to deploy a folder and subfolders to azure storage see https://github.com/glued/yokai theres some additional information about configuring the CDN for clean urls here: https://github.com/glued/yokai/blob/master/azure.md
这篇关于Azure CDN规则引擎重写默认文档并删除.html扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
- URL Rewrite - source
- Feature
- URL重写-源
- 功能