How can I make haproxy route requests based on URL substrings?
You want to use ACLs:
backend be1 # this is your default backend
...
backend be2 # this is for /tag-02 requests
...
frontend fe
...
default_backend be1
acl url_tag02 path_beg /tag-02
use_backend be2 if url_tag02
Section 7 of the HAProxy configuration guide has the details on ACLs, but you have to know the magic use_backend
incantation hidden in section 4 of the guide to know what to do with the ACLs.