Forum Discussion
jones618_164217
Nimbostratus
Jul 21, 2014iRule - if HTTP::uri is not one of two uri's redirect everything else
I'm trying to configure an iRule that will see if a uri starts with one of two uri's. If neither uri do a redirect. I have this working for checking one uri but I cannot get it to work when trying ...
Scott_Hopkins
Nimbostratus
Jul 21, 2014I usually prefer a switch statement:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/test1*"
"/test2*" { return }
default { HTTP::redirect "https://[HTTP::host]/neither-uri-so-redirect-to-this" }
}
}
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