Forum Discussion
Jules_Green_252
Nimbostratus
Mar 18, 2016I want to combine 3 iRules that are all redirects without "too many redirects" error
First iRule on port 80 VIP *forces ssl unless specific uri which will remain on 80":
when HTTP_REQUEST {
if { ! ( [string tolower [HTTP::uri]] starts_with "/investors" ) } {
HTTP::redir...
Yann_Desmarest_
Nacreous
Mar 18, 2016Hello,
You can use the switch command within a single irule :
switch -glob [string tolower [HTTP::path]] {
"/uri/for/pool1/*" -
"*pool_one*" -
"/another/uri/*" {
log local0. "Matched pool 1 paths for [HTTP::uri]"
pool pool1
}
"/uri/for/pool2/*" {
log local0. "Matched pool 2 paths for [HTTP::uri]"
pool pool2
}
default {
log local0. "Hit default for [HTTP::uri]"
pool pool_default
}
}
And you can check if the irule is triggered within an https or http VS using the following condition :
if { [PROFILE::exists clientssl] == 0 }- Jules_Green_252Mar 18, 2016
Nimbostratus
Ok, I will look into this one as well. Thank you!
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