【问题标题】:Azure Application Gateway Slash Rewrite ErrorAzure 应用程序网关斜线重写错误
【发布时间】:2018-05-24 07:33:29
【问题描述】:

我们创建了一个 Azure 应用程序网关,使用基于路径的规则根据客户端实例名称将客户端的请求重定向到后台池上的服务器,如下所示:

"/client1/*" -> Server1
"/client2/*" -> Server2
"/client3/*" -> Server1

当我们向http://mygateway.azure.com/client1/ 发出请求时,它工作正常,Server1 返回预期的页面。但是,当我省略了结尾斜线/ 时,比如http://mygateway.azure.com/client1,找不到Server1 并且没有返回页面。在重写操作期间,应用程序网关似乎无法解析 url。

我尝试过对 ApplicationGatewayBackendHttpSettings 中的路径进行严格的设置,例如“/client1”、“/client1/*”和“/client1*”,但没有成功。

你有没有遇到过这个问题?

Tks

【问题讨论】:

  • 这可能与issue-link中所述的斜杠重定向问题有关

标签: c# asp.net url-rewriting load-balancing azure-application-gateway


【解决方案1】:

Azure 应用程序网关当前不支持 URL 重写,but we are looking to add the feature in the future。

创建 URL 路由规则时,每个规则都必须以 / 开头,并且唯一允许使用“*”的位置是末尾的“/”。提供给路径匹配器的字符串在第一个之后不包含任何文本?或#,这些字符在这里是不允许的。

您很可能会指定要访问的确切页面或文件。

【讨论】:

猜你喜欢
  • 2016-05-20
  • 1970-01-01
  • 1970-01-01
  • 2019-05-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多