# Small help for the n00b - Dynamic rule

**URL:** <https://discourse.haproxy.org/t/small-help-for-the-n00b-dynamic-rule/5188>\
**Category:** Help!\
**Created:** [May 6, 2020, 10:46am UTC](https://discourse.haproxy.org/t/small-help-for-the-n00b-dynamic-rule/5188 "2020-05-06T10:46:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rickard\_505](https://avatars.discourse-cdn.com/v4/letter/r/5f9b8f/32.png) [@Rickard\_505](https://discourse.haproxy.org/u/Rickard_505)\
**Post date:** [May 6, 2020, 10:46am UTC](https://discourse.haproxy.org/t/small-help-for-the-n00b-dynamic-rule/5188/1 "2020-05-06T10:46:28Z")

</div>

I want to have a dynamic rule that takes subdomain and uses that value to form a backend name connection; example

123.foo.bar = use backend 123\_backend  
234.foo.bar = use backend 234\_backend  
…  
even more interesting alternative if it could use a dynamic lan domain naming…  
123.foo.bar = use backend 123.foo.lan  
…  
else (no backend responding on that name) use default backend

I want to avoid using any mapfile (to avoid restart of Ha) and minimize manual administration, the general idea is to have 2-3 rules dynamically covering hundred of front/backends

I hope the question is not to stupid to be asked 🙂
