Forum Discussion
sbrudolf1_14757
Nimbostratus
May 29, 2014Trouble with APM Irule
I am new to writing iRules and the switch function.. I am having trouble using the switch and a not statement to check if a cookie exists and then run the switch on that condition.. I know i am using...
Cory_50405
Noctilucent
May 29, 2014It appears to be something about the formatting of your switch statement. I got this one to load:
when HTTP_REQUEST {
if { ! [HTTP::cookie exists "MRHSession"] } {
switch -glob [string tolower [HTTP::path]] {
"/uri1*" -
"/uri2*" {
ACCESS::disable
}
}
} else {
ACCESS::enable
return
}
}
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