我有域名https://abc.example.com/a/b/c,我必须将网址转换为https://example.com/abc/a/b/c
为了实现它,我在前端
中完成了以下配置mode http
http-request set-var(req.rewrite_repo) req.hdr(host),lower,regsub(\.example\.com$,) if { hdr_end(host) -i .example.com }
http-request set-path %[var(req.rewrite_repo)]/v2%[path] if { var(req.rewrite_repo) -m found }
http-request set-header Host example.verizon.com if { var(req.rewrite_repo) -m found }
现在,如果我给http://abc.example.com,它工作正常。但如果我给https://abc.example.com它就不起作用了。你能帮帮我吗?