Ok, vamos fazer assim:
acl context_url url_reg -i -f /etc/haproxy/context_urls.list
use_backend context_backend if context_url
backend context_backend
# your config here
E no arquivo /etc/haproxy/context_urls.list
# regex for context urls
/context\d