Rehtt
V2EX  ›  问与答

caddy 反向代理求助

  •  
  •   Rehtt · Oct 18, 2019 · 2150 views
    This topic created in 2407 days ago, the information mentioned may be changed or developed.

    假如我有 a.com b.com 这两个网站,我想将 b.com 内容代理到 a.com/b 下.请问该怎么配置,我配置的会访问 a.com/b 时请求的是 b.com/b 导致失败

    1 replies    2019-10-18 14:51:01 +08:00
    Rehtt
        1
    Rehtt  
    OP
       Oct 18, 2019
    只想到了这个办法,可是还是不完美
    a.com {
    gzip
    redir 302{
    if_op and
    if {>Referer} has /b
    if {path} not_has /b
    / /b/{path}
    }
    proxy /b b.com {
    without /b
    }
    }
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3018 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 14:32 · PVG 22:32 · LAX 07:32 · JFK 10:32
    ♥ Do have faith in what you're doing.