Forum Discussion
jasona_40790
Jun 14, 2012Nimbostratus
need to rewrite HTTP 200 status code to HTTP 503
Hello,
I am performing website maintenance and need to bring down our website for a few hours. I will be
serving a friendly maintenance page during this time. However, when Google...
jasona_40790
Jun 14, 2012Nimbostratus
Thanks Richard,
Well, I added the 'Retry-After' code to my iRule and, while the iRule syntax accepted it, the maintenance page in the VIP is not accessible. I've posted my entire iRule. If I put the 'Retry-After' code anywhere else in the HTTP_REQUEST_SEND section, the iRule syntax will not accept it.
when HTTP_REQUEST_SEND {
if { [HTTP::header exists "Retry-After"] } {
HTTP::header replace Retry-After 10800
} else {
HTTP::header insert Retry-After: 10800
}
TCP::collect 12
}
when SERVER_DATA {
if {[findstr [TCP::payload 12] "200"] == "200"} {
TCP::payload replace 9 3 "503"
}
}
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