Forum Discussion
iRule for Single Wildcard VIP to Multiple Pools
You can try with below irule and you can tweak according to your requirement. when HTTP_REQUEST { if {([HTTP::host] equals "; ) } { pool pool1 } elseif { ([HTTP::uri] starts_with "/dev")} { pool pool2 } elseif { ([HTTP::uri] starts_with "/qa")} { pool pool3 } elseif { ([HTTP::uri] starts_with "/test")} pool pool4 } }
Hope this helps.
- Kevin_DaviesOct 23, 2017
Nacreous
when HTTP_REQUEST { if {[HTTP::host] equals "https://apps.mydomain.com"} { pool pool1 } elseif {[HTTP::uri] starts_with "/dev"} { pool pool2 } elseif {[HTTP::uri] starts_with "/qa"} { pool pool3 } elseif {[HTTP::uri] starts_with "/test"} { pool pool4 } }I have corrected the typos.. in any case thats not going to work as the first condition will always match.
FYI when pasting iRules, put your code on the page, when done, highlight the code and press TAB to indent it. Check the preview and you should see it formatted correctly.
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
