What is your class name that contains the HTML? Is it named exactly maint_index_html? If so you can reference it using $::maint_index_html. Can you try this rule and see if it works for you?
when HTTP_REQUEST {
Test the maint_index_html class
if {[info exists ::maint_index_html]}{
log local0. "\[lindex \$::maint_index_html 0\]: [lindex $::maint_index_html 0]"
} else {
log local0. "\$::maint_index_html doesn't exist!"
}
Service requests for files (URIs) from the maintenance page
Note that we always service these pages, even if the http_pool is up
set maint_prefix "/maintenancepage"
set maint_len [string length $maint_prefix]
set uri [HTTP::uri]
log local0. "redirect: [HTTP::uri]"
if { $uri equals $maint_prefix } {
HTTP::respond 301 "Location" "$maint_prefix/"
} elseif { $uri starts_with "$maint_prefix/" } {
Return the requested page
switch $uri {
"$maint_prefix/" -
"$maint_prefix/index.html" {
HTTP::respond 200 content [lindex $::maint_index_html 0] "Content-Type" "text/html"
}
"$maint_prefix/logo.png" {
HTTP::respond 200 content [b64decode [lindex $::maint_logo_png 0]] "Content-Type" "image/png"
}
default {
HTTP::respond 404
}
}
return
}
If the all members in the default pool are down, redirect to the maintenance page
if { [active_members [LB::server pool]] < 1 } {
HTTP::redirect "$maint_prefix/index.html"
}
}
If not, can you check the /var/log/ltm file for any errors or debug?
Thanks,
Aaron