Forum Discussion
iRule for redirecting the traffic of GoogleBot to a different pool using X-Header Value
Hello All,
I am looking to refine the rule proposed above just a bit and came up with the following:
---
when HTTP_REQUEST {
if { [HTTP::header exists X-APP-WHITELIST] and [HTTP::header X-APP-WHITELIST] equals "8" or [string tolower [HTTP::header User-Agent]] contains "googlebot" } {
pool A
else {
pool default
}
}
---
We are looking for the detail: "X-APP-WHITELIST" in the header equal to "8" OR if the user-agent has, "googlebot" discovered in the header. Not looking at the XFF part of the header. The, '&&' appears to be a logical AND in which both conditions have to be true. We are looking for one or the other; does not have to be both.
Does this look to be simpler?
Thank you all for your replies.
Recent Discussions
Related Content
* 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