跳转到内容
搜索文档

将管理区域请求重定向到 HTTPS

创建一条重定向规则,将 store.example.com 管理区域的请求重定向到 HTTPS,并保留原始路径与查询字符串。

最后更新 查看 MarkdownAgent 设置

此 zone example.com 的单条重定向示例会将特定子域名(store.example.com)管理区域的请求重定向到 HTTPS,并保留原始路径与查询字符串。

When incoming requests match(当传入请求匹配时)

  • Wildcard pattern(通配符模式)
    • Request URL(请求 URL): http://store.example.com/admin*

Then(然后)

  • Target URL(目标 URL): https://store.example.com/admin${1}
  • Status code: 301
  • Preserve query string: Enabled

例如,该重定向规则会执行以下重定向:

请求 URL 目标 URL 状态码
http://store.example.com/admin/products/ https://store.example.com/admin/products/ 301
https://store.example.com/admin/products/ (不变) n/a
http://store.example.com/admin/?logged_out=true https://store.example.com/admin/?logged_out=true 301
http://store.example.com/?all_items=true (不变) n/a
http://example.com/admin/ (不变) n/a

这篇文档对您有帮助吗?