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] > unless { hdr_beg(host) -i www } > > Note: I tried to use this syntax with reqirep and it does not work ;)
This syntax is only supported by http-request rules. It ensures that we don't break existing setups (especially because since version 1.1, there have been a huge amount of req* and rsp* rules deployed). We'll likely add new actions later for http-request (eg: "rewrite") to support this new syntax. Willy