Forum Discussion
Redirect subdomain URLs to different LTM pool
Hi Experts
Is it possible that 2 subdomains (web1.myapp.com and web2.myapp.com) of a parent website ( can have same Public IP Address . If the same is possible , then i would like to know how to redirect the parent website to LTM Pool A (based on host header) and redirect the child subdomains to Pool B and C respectively.
Rgds,
Ankur
3 Replies
- Samir_Jha_52506
Noctilucent
I guess Yes, its possible. Add alias name web1.myapp.com and web2.myapp.com in DNS & use iRule based on condition.
- irig4u_152672
Nimbostratus
You could use an irule to manipulate your HTTP Header to redirect different pool member
- Stanislas_Piro2
Cumulonimbus
You have two solutions:
- The old solution is to use iRules to change pool based on HTTP header "Host". this is the solution everybody will answer on devcentral
- The new solution (since 11.4) is to use LTM Policy. easier to configure, no syntax error.
the policy must be created with:
- require : http
- control : forwarding
rule 1:
- condition : HTTP-Host Host equals web1.myapp.com
- Action : Forward pool Pool_B
rule 2:
- condition : HTTP-Host Host equals web2.myapp.com
- Action : Forward pool Pool_C
rule 3:
- Condition : Leave blank
- Action : Forward pool Pool_A
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com