Forum Discussion
Daniel_S_135288
Nimbostratus
Jun 25, 2015catch bots
hey guys
can some one explain me why my irule does not work
when LB_SELECTED {
set uagent [string tolower [HTTP::header User-Agent]]
if { [matchclass $uagent contains datagroup_crawler] } {
...
nathe
Cirrocumulus
Jun 26, 2015It may be the matchclass thing that prevented it working with HTTP_REQUEST. The CLASS command replaces matchclass. See: matchclass and class
This should do it:
when HTTP_REQUEST
set user_agent [string tolower [HTTP::header User-Agent]]
if { [class match $user_agent contains datagroup_crawler] } {
pool pool_webserver_ch_de_bot
log local0. "using pool_webserver_ch_de_bot for UA $uagent"
}
}
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