Forum Discussion
david_blake_230
Nimbostratus
Oct 23, 2015Trying to Block a small group of pages using an iRule
Hello all, new to the F5 world, attempting to write my first iRule. We need an iRule to block a hand full of pages. This is the iRule we built and would not let us in through the F5 once we attache...
Brad_Parker_139
Nacreous
Oct 23, 2015Almost there.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/apscript.html" - "/appdet.html" {
reject
}
default {
return
}
}
}
- david_blake_230Oct 23, 2015
Nimbostratus
I need to add a condition to block "/webtools/*" how can that be accomplished? - Brad_Parker_139Oct 23, 2015
Nacreous
just add it like this: when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/apscript.html" - "/appdet.html" { reject } "/webtools/*" { do something } default { return } } } - Brad_Parker_139Oct 23, 2015
Nacreous
or if you are just wanting it to reject like the other two, when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/apscript.html" - "/appdet.html" - "/webtools/*" { reject } default { 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