# Multiple use\_backend with with different map

**URL:** <https://discourse.haproxy.org/t/multiple-use-backend-with-with-different-map/3839>\
**Category:** Help!\
**Created:** [May 21, 2019, 1:46pm UTC](https://discourse.haproxy.org/t/multiple-use-backend-with-with-different-map/3839 "2019-05-21T13:46:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![moscardo](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@moscardo](https://discourse.haproxy.org/u/moscardo)\
**Post date:** [May 21, 2019, 1:46pm UTC](https://discourse.haproxy.org/t/multiple-use-backend-with-with-different-map/3839/1 "2019-05-21T13:46:24Z")

</div>

Hi,  
I am trying to have multiple map files used in the same frontend like:

```auto
  use_backend %[req.hdr(host),lower,map(/etc/haproxy/web-dom2back.map)]
  use_backend %[req.hdr(host),lower,map(/etc/haproxy/web-dom1back.map)]

```

But what happens is that when I try to access a website that is defined in web-dom1back.map it doesn’t work because it is not found on the first map and then defaults to something else.

What options do I have here? I just would like to have this setup to have better organized the maps with shorter files.

Thanks.

---

<div class="post-metadata">

**Author:** ![giggsey](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/giggsey/32/848_2.png) [@giggsey](https://discourse.haproxy.org/u/giggsey)\
**Post date:** [June 3, 2019, 10:20am UTC](https://discourse.haproxy.org/t/multiple-use-backend-with-with-different-map/3839/2 "2019-06-03T10:20:38Z")

</div>

Hi,

I had the same issue, and putting the if statement at the end of each line (as per [Using use\_backend rules with map files](https://discourse.haproxy.org/t/using-use-backend-rules-with-map-files/208)) resolved my problem.

---

<div class="post-metadata">

**Author:** ![moscardo](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@moscardo](https://discourse.haproxy.org/u/moscardo)\
**Post date:** [June 6, 2019, 3:50pm UTC](https://discourse.haproxy.org/t/multiple-use-backend-with-with-different-map/3839/3 "2019-06-06T15:50:44Z")

</div>

you are right, I was missing the conditional.

Cheers.
