Since I keep forgetting them I've put them here.
To form a condition, you can use the following syntax after the rule that it applies to:
<HAProxy action statement> if|unless [!]acl1 <AND|OR|or|'||'> [!]acl2 ...
if- the condition is TRUE if the result of the ACLs is TRUE.