Forum Discussion
iRule help
Hi,
I want an iRule which can match a specific URI on an incoming http request and redirect traffic to a specific pool member of a pool. Please help.
Srini
17 Replies
- What_Lies_Bene1
Cirrostratus
OK, so how do you want to route to the pools? Using which digit in the URI? Or all of them? Are there 10 possible outcomes or 10,000? - Srinivasan_G_31
Nimbostratus
I want to match the digits (preferably with a syntax matching anything from 0 to 9) and want to route it to a specific pool member inside a pool.
- What_Lies_Bene1
Cirrostratus
You want to match all four digits? i.e check for 9999 possible combinations? - Srinivasan_G_31
Nimbostratus
Answer for now is YES but i am looking from the developer on a finite set of node IDs that can be matched. - hoolio
Cirrostratus
If you want to specify a particular pool member for requests which have a URI that contains four digits you could try something like this (1.1.1.1:80 being the special pool member of the VS default pool):when HTTP_REQUEST { switch -glob [HTTP::path] { "*[0-9][0-9][0-9][0-9]*" { pool [LB::server pool] member 1.1.1.1 80 } default { pool [LB::server pool] } } }
Aaron - Srinivasan_G_31
Nimbostratus
Thanks Aaron. A general query though. I already have an iRule applied to a particular VS. How the system treates the second iRule on the same VS? Are the lookups performed on both iRules simultaneously?
- hoolio
Cirrostratus
Answered here:
https://devcentral.f5.com/internal-forums/aft/2164806
Aaron
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