HAProxy community

HAProxy acl and maps

I’m trying to setting up my haproxy in order to use maps.
My idea is to have a map_file.txt:

_status_example.com:443   ON
example.com:443   http://new_url.com

In the acl I would like to have something like that:

acl redirect_enabled {if _status_example.com:443==ON }
http-redirect example.com:443,map(./map_file.txt) if redirect_enabled

I’m struggling trying to write the acl part. Is there a way to compare two string in haproxy configuration?

I post my solution so if someone needs can have look:

acl url_redirect str(_status-example.com),map(/usr/local/etc/haproxy/redirect.txt) -m str ON
http-request redirect location %[str(example.com),map(/usr/local/etc/haproxy/redirect.txt)] code 301 if url_redirect