Forum Discussion
Yasunori_Shimur
Nimbostratus
Jul 16, 2020To display Maintenance Page using iRule
I wanna creating a Maitenance Page by using iRule on BIG-IP when Virtual Server's pools are all down, I created a following iRule. When entering https://example.com/, displayed the Maintenance Page...
Jul 16, 2020
Hi Yasunori,
Can you try this?
when HTTP_REQUEST {
if { [active_members [LB::server pool ]] < 1 } {
switch [HTTP::uri]
{
"/application.css" { HTTP::respond 200 content [ifile get "MAINTENANCE_application"] "Content-Type" "text/css" }
"/contents.css" { HTTP::respond 200 content [ifile get "MAINTENANCE_contents"] "Content-Type" "text/css" }
"/default.css" { HTTP::respond 200 content [ifile get "MAINTENANCE_default"] "Content-Type" "text/css" }
"/defaultHub.css" { HTTP::respond 200 content [ifile get "MAINTENANCE_defaultHub"] "Content-Type" "text/css" }
"/footer_logo.png" { HTTP::respond 200 content [ifile get "MAINTENANCE_footer_logo"] "Content-Type" "image/png" }
"/footer_privacy.png" { HTTP::respond 200 content [ifile get "MAINTENANCE_footer_privacy"] "Content-Type" "image/png" }
"/global_navi.css" { HTTP::respond 200 content [ifile get "MAINTENANCE_global_navi"] "Content-Type" "text/css" }
"/logo-hd.png" { HTTP::respond 200 content [ifile get "MAINTENANCE_logo-hd"] "Content-Type" "image/png" }
"/module.css" { HTTP::respond 200 content [ifile get "MAINTENANCE_module"] "Content-Type" "text/css" }
"/normal.css" { HTTP::respond 200 content [ifile get "MAINTENANCE_normal"] "Content-Type" "text/css" }
"/return_top_link.png" { HTTP::respond 200 content [ifile get "MAINTENANCE_return_top_link"] "Content-Type" "image/png" }
default { HTTP::respond 200 content [ifile get "MAINTENANCE_index"] "Content-Type" "text/html" }
}
}
}
Yasunori_Shimur
Nimbostratus
Jul 17, 2020Hi eaa
I'll try this next week.
Thanks
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