CSGO
V2EX  ›  站长

问个域名相关问题,重定向问题?

  •  
  •   CSGO · May 7, 2022 · 2402 views
    This topic created in 1499 days ago, the information mentioned may be changed or developed.
    比如自己注册一个域名:my.com
    然后比如有很多现成的别人的链接:google.com/1.html google.com/2.html ....

    那么有没办法用 cloudflare 的页面规则就能实现当用户访问 my.com/1.html 就自动跳转到 google.com/1.html
    8 replies    2022-05-07 17:24:07 +08:00
    iBugOne
        1
    iBugOne  
       May 7, 2022 via Android   ❤️ 1
    Forwarding Page (302 或 301)

    my.com/*google.com/$1

    看看文档就知道的事情,没必要再提问吧
    CSGO
        2
    CSGO  
    OP
       May 7, 2022
    @iBugOne 你说了我再看了也没看懂。
    CSGO
        3
    CSGO  
    OP
       May 7, 2022
    @iBugOne 那我添加了之后,访问 my.com 也会跑到 google.com , 是否有办法添加一条啥让默认不重定向?
    wdssmq
        4
    wdssmq  
       May 7, 2022   ❤️ 1
    @CSGO #3 目测只支持通配符匹配,复杂一些的需要用 Nginx 或 Apache 写正则实现。
    killva4624
        5
    killva4624  
       May 7, 2022
    CSGO
        6
    CSGO  
    OP
       May 7, 2022
    @wdssmq OK
    Dvel
        7
    Dvel  
       May 7, 2022
    Cloudflare Workers 可以,我之前也是照着官方文档瞎琢磨的,这个应该符合你的需求:
    https://dvel.me/posts/cloudflare-workers-redirect/#%E6%89%8B%E5%86%99%E6%9B%B4%E9%80%9A%E7%94%A8%E7%9A%84%E8%BD%AC%E6%8D%A2
    JinShu
        8
    JinShu  
       May 7, 2022
    我记得
    https://www.fikker.com/
    这个程序可以实现
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6119 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 54ms · UTC 02:58 · PVG 10:58 · LAX 19:58 · JFK 22:58
    ♥ Do have faith in what you're doing.