Forum Discussion
URI redirection using Switch
Hello All, I'm looking for a script to do redirection of request to specific pool which matches specific URI.
Could any one provide a script which help to do URI redirection to a pool using switch?
Thanks a lot in adavance of your help.
Regards, Thiyagu
- Samir_Jha_52506Noctilucent
There are many many Irule available in devcentral. But I will suggest you to use f5 policy to match URI n redirect traffic to pool... Create a new policy with properties:
Policy requires http Policy controls forwarding For each policy rule, define:
condition : http-uri parh starts_with /bugid action : forward pool pool_x Create a default rule without conditon assigning the default pool..
Example iRule(use of data group)
when HTTP_REQUEST { if { [class match [string tolower [HTTP::path]] starts_with "uri_DataGroup" }{ pool pool_x } else { pool defaultPool } }
- Samir_Jha_52506Noctilucent
Find the iRule with Switch...
when HTTP_REQUEST { set uri [string tolower [HTTP::path]] switch -glob $uri { "/book/" { pool pool_A } "/manage/" { pool pool_B } "/checkin/" { pool pool_C } } }
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