irule to redirect traffic to an outside website when all pool members are down
You can write iRule but i suggest you to add fallback details in HTTP profile.
OR Maintenance URL
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
HTTP::redirect "http://maintenance.host.url/dir/dir/file"
TCP::close
}
}
The script worked for me without “dir/dir/file”
Url was just an example. However you can customize based on requirements.