Forum Discussion
irule required for redirection
following URLS to go to a pool containing 10.10.10.25:8080 and 10.10.10.89:8080 The following urls should go to the pool.
http(s)://abc.com/ht360services/ http(s)://abc.com/ordermanager/ http(s)://abc.com/bicommonui else all other request should go to the default pool.
below is the script i wrote, please review it and let me know wr i went wrong. if {[HTTP::uri] matches_regex "abc/ordermanager"} { pool pool_abc_ordermanager } elseif {[HTTP::uri] matches_regex "abc.com/ht360services"} { pool pool_abc_ordermanager } elseif {[HTTP::uri] matches_regex "abc.com/bicommonui"} { pool pool_abc_ordermanager } else { pool pool_abc.com } }
1 Reply
- Michael_Jenkins
Cirrostratus
You could use a switch statement instead, which would be more efficient. This should help.
switch -glob -- [string tolower "[HTTP::host][HTTP::uri]"] { "*abc.com/ordermanager*" - "*abc.com/ht360services*" - "*abc.com/bicommonui*" { pool pool_abc_ordermanager } default { pool pool_abc.com } }
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