Forum Discussion
reseob_90588
Nimbostratus
Jul 25, 2013Adding properly formatted headers to maintenance messages
Hey Guys,
I've spent a bit of time trying to figure out how to build an i-Rule that will respond in a manner that we would like. The gist of it is that we would like to add the retry-after (set...
Kevin_Stewart
Employee
Jul 30, 2013A few tings to consider:
1. First, Headers are inserted AFTER content in the HTTP::respond command:
when HTTP_REQUEST {
if { ( [active_members [LB::server pool]] == 0 ) or ( [HTTP::uri] equals "/maintenance.htm" ) } {
HTTP::respond 503 content "blah" "Retry-After" 5 "Connection" "Close"
}
}
2. The Retry-After header value is in seconds, so 10800 is 3 hours.
3. I don't know of ANY browser that pays attention to this header. I've read that some web spiders do (ex. Googlebot), but that's about it.
4. If this is for browser-based traffic, I'd probably recommend something like a meta-refresh header in the maintenance page that redirected back to the site. You could even dynamically fill the refresh header with the last URI requested.
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