Forum Discussion
AP_5759
Nimbostratus
Jun 15, 2017Help with iRules and URI redirection
Hello everyone. I am looking for help with irule design to perform the following: remove "services" from uri and forward traffic to a specific pool as following
http://dev.api.company.com/service...
Vijay_E
Cirrus
Jun 15, 2017This should provide a rough idea. Create a datagroup: CLASS_URI_POOL
/services/nameofservice1:=pool1_8888
/services/nameofservice2:=pool2_8889
/services/nameofservice3:=pool3_8890
/services/nameofservice4:=pool4_8891
/services/nameofservice5:=pool5_8892
when HTTP_REQUEST {
set POOL [class match -value $URI contains CLASS_URI_POOL]
if { $POOL eq "" } {
HTTP::uri [string map {/services/ /} [HTTP::uri]]
pool $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