title: HAproxy domain name to backend mapping for path(url) based routing
body: <p>Does HAProxy support domain name to backend mapping for path based routing. </p>
  
  <p>Currently it does support maps for vhost:</p>
  
  <pre><code>frontend xyz
     &lt;other_lines&gt;
     use_backend backend1 if { hdr(Host) -i myapp.domain1.com }
     use_backend backend2 if { hdr(Host) -i myapp.domain2.com }
  </code></pre>
  
  <p>Can be rewritten using maps as:</p>
  
  <pre><code>frontend xyz
     &lt;other_lines&gt;
     use_backend %[req.hdr(host),lower,map_dom(/path/to/map,default)]
  </code></pre>
  
  <p>With the contents of map file as:</p>
  
  <pre><code>#domainname  backendname
  myapp.domain1.com backend1
  myapp.domain2.com backend2
  </code></pre>
  
  <p>But if the routing  is based on paths as shown in the example below:</p>
  
  <pre><code>frontend xyz
     acl host_server_myapp hdr(host) -i myapp.domain.com
     acl path_path1 path_beg /path1
     acl path_path2 path_beg /path2
     use_backend backend1 if host_server_myapp path_path1
     use_backend backend2 if host_server_myapp path_path2
  </code></pre>
  
  <p>Is it possible to have mapping for this usecase?  Using <code>base</code> instead of hdr(host) might give the entire path but it will not have the flexibility of domains since <code>base</code> is string comparison. Is there an other way to convert this to haproxy maps.</p>