Forum Discussion
Ravi_75522
Feb 02, 2012Nimbostratus
Problem with bots redirect
We have defined a robots class, and if any user agent matches an entry in robots class then it redirected to a pool. But the problem is that we want to redirect the traffic to different pool when the agent is googlebot and specific uri then redirect to a different pool altogether. How do we do this.
The irule for bots is as below
when HTTP_REQUEST { if { [matchclass [HTTP::header User-Agent] contains robots] } { pool NeimansBOT } }
and additional condition is that if there ia request coming from /blog (which is the URI part) and the agent is googlebot then redirect it to different pool.
Can we have the logic defined as
when HTTP_REQUEST {
if { ([matchclass [string tolower [HTTP::header User-Agent]] contains googlebot]) and ([HTTP::uri] contains "/blog")} { pool xyz }
elseif { [matchclass [HTTP::header User-Agent] contains robots] } { pool NeimansBOT } }
- nitassEmployeei think the irule could be okay.
when HTTP_REQUEST { if { ([matchclass [string tolower [HTTP::header User-Agent]] contains googlebot]) and ([HTTP::uri] contains "/blog")} { pool xyz } elseif { [matchclass [string tolower [HTTP::header User-Agent]] contains robots] } { pool NeimansBOT } else { pool default_pool } }
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