Forum Discussion
Daniel_S_135288
Nimbostratus
13 years agoirule to log googlebots
Hello
My goal is to log the googlebot's.
I want to log the time and which page was crawled...
Can anybody help me?
Regards
Danisch
- 13 years ago
something like (not tested);
when HTTP_REQUEST { set fBot 0 if {[HTTP::header value "User-Agent"] contains "Googlebot"} { set fBot 1 set ua [HTTP::header value "User-Agent"] set uri [HTTP::uri] } } when HTTP_RESPONSE { if {$fBot} { log local0. "[clock clicks -milliseconds],$uri,$ua,[HTTP::status]" } }
IheartF5_45022
Nacreous
13 years agosomething like (not tested);
when HTTP_REQUEST {
set fBot 0
if {[HTTP::header value "User-Agent"] contains "Googlebot"} {
set fBot 1
set ua [HTTP::header value "User-Agent"]
set uri [HTTP::uri]
}
}
when HTTP_RESPONSE {
if {$fBot} {
log local0. "[clock clicks -milliseconds],$uri,$ua,[HTTP::status]"
}
}
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
