Forum Discussion
Lazaro_Pereira_
Nimbostratus
Nov 11, 2014Content Switch with Sorry Page
Hi Everyone, I am using content switching to use HTTP host to decide what pool traffic should go to. I would also like to be able to display a "Sorry" Error page if all the servers in a pool are ...
shaggy
Nimbostratus
Nov 11, 2014You could insert a check after the switch statement similar to:
if { [active_members [LB::server pool]] == 0 } {
create data variables with HTML content to send to client
set httphost [string tolower [HTTP::host]]
set data " $httphost Sorry: The Site you are trying to reach is currently Unavailable. If you believe you are receiving this message in error, contact our service desk at XXXXX."
send string
HTTP::respond 200 content $data
This should check for active members in the current selected pool and remove the need to check each individual pool in each switch entry
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