Forum Discussion
Tom_White_69772
Nimbostratus
May 14, 2008iRule to redirect to Pool
We need to add an addendum to an existing iRule that will search for a URL/URI string and send those requests to a different F5 pool. If any of the following URL/URI combinations passes, we want to send them to the ESCMYURI_POOL.
https://mydomain.com/wps/myportal/escmyuri
https://mydomain.com/wps/portal/escmyuri
https://mydomain.com/wps/myportal/esccmyuri
https://mydomain.com/wps/portal/esccmyuri
Also, can we do this using the global switch command?
- Nicolas_Menant
Employee
switch [string tolower [HTTP::uri]] { "wps/myportal/escmyuri" { pool X} "wps/portal/escmyuri { pool Y} defaut { ESCMYURI_POOL}
- Colin_Walker_12Historic F5 AccountAlso, if you want to ensure that it's a particular domain AND a particular URI, you can expand the above example slightly to look for both:
when HTTP_REQUEST { switch "[HTTP::host][string tolower [HTTP::uri]]" { "mydomain.com/wps/myportal/escmyuri" - "mydomain.com/wps/portal/escmyuri" - "mydomain.com/wps/myportal/esccmyuri" - "mydomain.com/wps/portal/esccmyur" - default { pool ESCMYURI_POOL } } }
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects