On Wed, Oct 29, 2014 at 11:07 AM, M. Lebbink <[email protected]> wrote: > Hi list, > > I've been wrestling with rewrite rules withing haproxy and httpd, but I > can't find the docs I would like to read. > > I keep reading examples with all sorts of rules containing hdr_dom(host) & > hdr_beg(host). But I can't find > any description of what is actually contained in these values. > > Does anyone have a link or pdf listing and describing these headers? > > All I want to do is check if there is a specific string in the URL for one > of the backends and if it is present, rewrite > that rule by replacing parts of it to create something the httpd server will > actually understand..... > > > Michiel >
Hi, What you want to do is a reqirep conditionned by an ACL on path. The doc: http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#reqirep The example: reqrep ^([^\ :]*)\ /static/(.*) \1\ /\2 if {path_beg /static/ } The doc about path acl: http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#path other ACLs are defined in the same chapter. Baptiste

