How can I get HAProxy backends to include a path

I think you're looking for something like this in order to balance to different servers based on the URL:

frontend http-farm
    bind 0.0.0.0:80
    acl app1web     hdr_beg(host) -i app1  # for http://app1.domain.com
    acl app2web     hdr_beg(host) -i app2  # for http://app2.domain.com

acl msg-url-1 url_reg ^\/path/games/.*
acl msg-url-2 url_reg ^\/path/photos/.*
acl msg-url-3 url_reg ^\/path/mail/.*
acl msg-url-4 url_reg ^\/path/wazap/.*

use_backend games  if  msg-url-1 app1web
use_backend photos if  msg-url-2 app2web
use_backend mail if .....



backend games
    option httpchk GET /alive.php HTTP/1.1\r\nHost:\ app1.domain.com
    option  forwardfor
    balance roundrobin
    server  appsrv-1  192.168.1.10:80  check inter 2000 fall 3
    server  appsrv-2  192.168.1.11:80  check inter 2000 fall 3

backend photos
    option httpchk GET /alive.php HTTP/1.1\r\nHost:\ app2.domain.com
    option  forwardfor
    balance roundrobin
    server  appsrv-1  192.168.1.13:80  check inter 2000 fall 3
    server  appsrv-2  192.168.1.14:80  check inter 2000 fall 3

Source: Haproxy ACL for balance on URL request