Forum Discussion
Gill_32697
Nimbostratus
Oct 21, 2012help making redirect irule
Im new to irules, need some help writing a irule
vip: 10.1.255.32
node: 10.13.0.61
node: 10.0.1.213
Web programer wants any http request with
http://test.com/Akcelerant/… ...
nitass
Employee
Oct 22, 2012i agree with Mohamed. if you are not familiar with irule, you had better use httpclass.
sol13753: Using HTTP Classes to load balance HTTP requests to multiple pools
http://support.f5.com/kb/en-us/solutions/public/13000/700/sol13753.html
i used data group in previous example because i thought it would be easier to add or remove uri. anyway, if you do not want to use data group, you can use switch statement and put uri in the irule.
e.g.
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/Akcelerant/*" -
"/IDSAkcelerant/*" -
"/LMAkcelerant/*" -
"/IDSAkcelerantMTG/*" {
pool Server1-pool
}
default {
pool Server2-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