Forum Discussion
Will_Adams_1995
Nimbostratus
Nov 11, 2015Is iRule the correct method?
I am configuring a new policy on my F5 and I was looking to delve a little into iRules I think for part of this policy. I would like to know if an iRule would be the correct method to use? I have nev...
Stanislas_Piro2
Cumulonimbus
Nov 12, 2015Hi,
prefer use pool assignment instead of node... create one pool for each URL.
- pool_prod : member 10.10.10.10 port 1234
- pool_test : member 10.10.10.10 port 4567
- pool_dev : member 10.10.10.10 port 8911
use Local traffic policy :
- requires : http
- controls : forwarding
-
rule 1 :
- condition : http-uri path starts_with /prod
- action : forward pool pool_prod
-
rule 2:
- ..
-
rule 3:
- ..
-
rule 4 (default):
- condition : none
- action : forward pool def_pool
if you really want to use irule, use switch command:
when HTTP_REQUEST {
switch -glob [HTTP::path] {
"/prod*" {
pool pool_prod
}
"/test*" {
pool pool_test
}
"/dev*" {
pool pool_dev
}
default {
pool def_pool
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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