I am working with acl statment in haproxy 1.5 as shown below.
The idea is that for this specific site cop backend should be used but its not working. I tried with hdr(dom) and few other options but it didnt help.
Here is the code
frontend proxylb
bind *:80
maxconn 20000
acl is_cnn hdr_beg(host) -i cnn.com
use_backend cop if is_cnn
default_backend sf
backend sf
balance roundrobin
option httpclose
option forwardfor
cookie JSESSIONID prefix
server proxy01 10.1.1.10:80 cookie A check
server proxy02 10.1.1.11:80 cookie A check
backend cop
balance roundrobin
option httpclose
option forwardfor
log global
cookie JSESSIONID prefix
server proxy03 10.1.1.12:80 cookie A check