【问题标题】:How to route www to non-www URL using Google App Engine如何使用 Google App Engine 将 www 路由到非 www URL
【发布时间】:2022-01-17 10:31:28
【问题描述】:

我有一个自定义域“domain.tld”。我通过 Google App Engine 中的“自定义域”选项卡按照说明配置了所有内容。我必须在我的 app.yaml 文件中添加一个安全处理程序,以将所有 http 定向到 https,但我还想将所有 www.domain.tld 定向到 domain.tld,但我不知道该怎么做。

【问题讨论】:

标签: google-app-engine


【解决方案1】:

您可以按照应用引擎通配符documentation 使用dispatch.yml

dispatch:
  # Default service serves the typical web resources and all static resources.
  - url: "www.domain.tld/*"
    service: default
 

【讨论】:

  • default 应该在某个地方定义吗?
  • 我试过这个。它没有做任何事情......
猜你喜欢
  • 2022-01-24
  • 1970-01-01
  • 2014-12-07
  • 1970-01-01
  • 2012-03-24
  • 1970-01-01
  • 2010-11-12
  • 2015-02-27
相关资源
最近更新 更多