Forum Discussion
skahler_85363
Nimbostratus
Jun 06, 2008iRule not always processing
I had emailed support to answer my question and the response back was that this was an iRule question and they seemed to infer I'd be best to ask here first.
I have written a very simpl...
The_Bhattman
Nimbostratus
Jun 06, 2008I think the following a more simpler iRule:
when HTTP_REQUEST {
if { [HTTP::header "Referer"] contains "gadget" } {
discard
}
}
This simply means that if you have a referer that contains gadget anywhere in the header field it will discard. For example it was discard "gadget, disgadget, mothergadget, papagadget, gogogadgetchopper, etc" However, I am not sure if it's case sensitive. If it is then it the code could be written as the following:
when HTTP_REQUEST {
if { [string tolower [HTTP::header "Referer"]] contains "gadget" } {
discard
}
}
Click here if you want to look at HTTP::header function more closely.
Hope this helps
CB
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
