Re: reqrep with a match/backref into Host: header?

2014-03-05 Thread Willy Tarreau
On Fri, Feb 28, 2014 at 01:54:52PM +0100, Baptiste wrote: Hi Philipp, You can't do this in current HAProxy. That said, it may happen soon, since the you can already use some header values in the http-request rules: IE: http-request redirect code 301 location www.%[hdr(host)]%[req.uri]

reqrep with a match/backref into Host: header?

2014-02-28 Thread Philipp
Hi, current functional setup: frontend f acl ssfc_dev hdr(host) -m str dev.example.com acl ssfc_img hdr(host) -m str img.example.com [..] reqrep ^GET[\ \t]*/(.*) GET\ /dev.example.com/\1 if ssfc_dev reqrep ^GET[\ \t]*/(.*) GET\ /img.example.com/\1 if ssfc_img the backend webserver treats that

Re: reqrep with a match/backref into Host: header?

2014-02-28 Thread Baptiste
Hi Philipp, You can't do this in current HAProxy. That said, it may happen soon, since the you can already use some header values in the http-request rules: IE: http-request redirect code 301 location www.%[hdr(host)]%[req.uri] unless { hdr_beg(host) -i www } Note: I tried to use this syntax