0
...more code

frontend http-in
    bind *:80
    acl host_mydomain   hdr_beg(host) -i www.mydomain.com

    redirect scheme https code 301 if !host_mydomain or !{ ssl_fc }

    use_backend mydomain_backend    if host_mydomain

...more code

I'm trying to route all traffic to https except if www.mydoamin.com comes in, then it's supposed to use http. I was reading the documentation over at https://www.haproxy.com/doc/aloha/7.0/haproxy/conditions.html#writing-a-condition

1 Answer 1

0

Karl,

Call me crazy bu don't you just need to remove the OR?

redirect scheme https code 301 if !host_mydomain or !{ ssl_fc }

should be:

redirect scheme https code 301 if !host_mydomain AND !{ ssl_fc }

i.e. if NOT the domain I don't want AND NOT SSL

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .