Forum Discussion
iRule to Forward Traffic Based on URL Name
- Feb 23, 2022
Hi
below irule will help
https://support.f5.com/csp/article/K27803480
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] eq "host1") {
pool pool1
} elseif { ([string tolower [HTTP::host]] eq "host2") {
pool pool2
}
}
You can use LTM Policies that are in the document that I shared with you before, which is the best way to make this type of deployment without irules.
Hi Manu_Nair ,
Modified LTM policy as per your use case. You can have such multiple rules to match based on the URL under a LTM policy.
iRule given by neeeewbie is also perfect for your use case. One more thing that I want to highlight here is that if you have different domains which will hit on single virtual server with secured port, you would need to handle SSL certiifcates appropriately so for each URL/Site, client will get desired certificate. For this, you need to configure F5 vServer to serve multiple HTTPS sites using the TLS SNI feature.
Ref. article - https://support.f5.com/csp/article/K13452
Hope it helps!
- Manu_NairFeb 23, 2022Cirrus
Hi Mayur,
Thanks for the reply!! I got the certs and other stuff ready. Just was struggling to get this done cos i am not sure what parameter to pass ( eg : HTTP Host ). i will try this with policy and see.
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