Forum Discussion
dexter_22020
Nimbostratus
Aug 26, 2010redirecting links to a maintenance page on 1 virtual server
Hi,
Is it possible to have 1 virtual server that has multiple maintenance page for different links? For example:
www.domain.com/app1 --> gets data to app_server1
www.domain.com/...
hoolio
Cirrostratus
Oct 07, 2010Hi,
Something like this should work for you. I'm saving the URI in HTTP_REQUEST as LTM doesn't do this automatically for you.
when HTTP_REQUEST {
set uri [HTTP::uri]
}
when LB_FAILED {
A load balancing attempt failed. Check if the current selected pool has any members.
if { [active_members [LB::server pool]] == 0 } {
Check the requested HTTP URI with wildcard support
switch -glob $uri {
"/app1*" {
URI started with /app1
Save the fallback URI as app1_site
set uri "app1_site"
}
default {
URI didn't start with /app1
Save the fallback URI as app2_site
set uri "app2_site"
}
}
No active members, so use the dynamically set fallback URL
HTTP::fallback "HTTP://maintenance.domain.com/$uri"
}
}
Aaron
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