【问题标题】:Azure CDN Rule EngineAzure CDN 规则引擎
【发布时间】:2017-11-10 01:41:13
【问题描述】:

我在 Azure CDN 中托管和 html 网站(在 Premier 付费计划下),因此它为我提供了一个规则引擎,它提供了许多控制流程的功能。我想要 URL 重定向URL 重写 Azure CDN 规则。

示例:

给定一个类似www.example.com 的网站,用户可以在该网站上查看www.example.com/username 的信息,我在 IIS 中设置了以下规则:

<rule name="rulex" enabled="true" stopProcessing="true">
  <match url="." ignoreCase="false" />
    <conditions logicalGrouping="MatchAll">
       <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
   </conditions>
   <action type="Rewrite" url="/index.html" />
</rule>

那么,请问如何在 Azure CDN 中设置相同的规则?这可能吗?任何指向示例的链接将不胜感激:)

【问题讨论】:

    标签: azure url-rewriting rule-engine url-rewrite-module azure-cdn


    【解决方案1】:

    以下来自 microsoft docs 的官方文档对此进行了解释

    【讨论】:

      【解决方案2】:

      Azure CDN 不支持 URL 重写。它只是缓存请求的 URL(根据任何查询字符串或标头缓存规则集),并为同一 URL 的后续请求返回缓存的响应。

      【讨论】:

      • OP 明确表示“Azure CDN(在具有 Premier 付费计划的情况下),因此它为我提供了一个规则引擎”,因此它确实允许 URL 重写和重定向。带有 Verizon P1 计划的 Azure CDN 确实允许 URL 重写。
      猜你喜欢
      • 1970-01-01
      • 2021-06-20
      • 1970-01-01
      • 2023-02-09
      • 2016-09-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-18
      相关资源
      最近更新 更多