Rehtt
V2EX  ›  问与答

caddy 反向代理求助

  •  
  •   Rehtt · Oct 18, 2019 · 2480 views
    This topic created in 2580 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
    Rehtt
    OP
    Oct 18, 2019
    1
    只想到了这个办法,可是还是不完美
    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   ·   Privacy   ·   Solana   ·   941 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 20:21 · PVG 04:21 · LAX 12:21 · JFK 15:21
    ♥ Do have faith in what you're doing.