Forum Discussion
DarkSideOfTheQ_
Jul 15, 2010Nimbostratus
Hi Hoolio,
I appreciate the assistance. I wasn't sure about appending the "Retry-After" header after I had the 503 in there. I had to modify the Retry-After part as it wouldn't accept it (I'm running 9.2.4 if that makes a difference?)
Here is what I got working if someone comes across the need for something like this as I did.
when HTTP_REQUEST {
Check the User-Agent header
switch -glob [string tolower [HTTP::header User-Agent]] {
"*msnbot*" -
"*fast-*" -
"*yahoo-newscrawler*" -
"*baiduspider*" -
"*google*" {
Send a 503 response with a Retry-After header set to 3 hours
Don't include the Server: BigIP header (noserver)
HTTP::respond 503 noserver Retry-After:10800
}
}
}