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...
Hannes_Rapp
Nimbostratus
Oct 23, 2015You're were quite close. Try the code below.
Cause:
Your
[HTTP::uri] function had unnecessary appendix
Mere recommendations:
the
[HTTP::path] function will suffice here
-glob flag in the switch statement is not required since you dont have any specific expressions such as wildcard symbols
when HTTP_REQUEST {
switch [string tolower [HTTP::path]] {
"/apscript.html" -
"/appdet.html" {
drop
} 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