estk

配置 Cloudflare 301 跳转的坑

  •  
  •   estk · Sep 20, 2022 · 2073 views
    This topic created in 1354 days ago, the information mentioned may be changed or developed.

    假设你要把 www.baidu.com 301 到 baidu.com ,需要以下 2 步操作:

    1. page rules 里

    • URL 填写:www.nestjs.gay/*,开头不需要要 http
    • Pick a Setting 选择 forwarding URL
    • destination URL 填写 https://baidu.com/$1 ,填 /$1 的目的是为了保留转发的路径不变

    2. DNS 解析那里

    • www.baidu.com cname 到 www.cloudflare.com ,并且勾选 Proxied ,当然也可以用 A 解析到某个 Cloudflare 的 ip 上,没这个解析的话,301 无法生效,解析到非 Cloudflare ip 也无效,这就是坑
    1 replies    2022-11-22 15:33:19 +08:00
    FarAhead
        1
    FarAhead  
       Nov 22, 2022
    这应该是正常的使用步骤,你不把请求 proxy 给 Cloudflare ,Cloudflare 怎么重定向请求
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2832 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 14:29 · PVG 22:29 · LAX 07:29 · JFK 10:29
    ♥ Do have faith in what you're doing.