Forum Discussion
Gill_32697
Nimbostratus
Oct 23, 2012Need redirect irule help please !
I need a redirest irule, I can not use http class.
The developer only want the irule to act on the specifc uri path and send to pool1, any other uri path or no uri path at all goes to pool2. ...
- Oct 23, 2012
Correct, add another line after the first one. THe new line would look like
"/newuri/" -
and yes, it should match only the uri's as specified. Actually, it will be case-insenstive, so it would match the uri list no matter what combination of upper and lowercase characters. If you do not want that and only want it to match on lower case, then change the switch statement to:
switch -glob [HTTP::path]
Pconlan_71037
Altocumulus
Oct 23, 2012Here is how I do it.
------------------------------
when HTTP_REQUEST {
use tolower to make the match case-insensitive
switch -glob [string tolower [HTTP::path]] {
"/akcelerant/" -
"/idsakcelerant/" -
"/idsakcelerantmtg/" -
"/lmakcelerant/" {
pool pool1
}
default {
pool pool2
}
}
}
----------------------------------------
If you want all sub-uri's below the specified uri's to go to pool1 as well, then add a * at the end of each one, like "/akcelerant/*".
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
