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/app2 --> gets data to app_server2
If the links doesn't get 200 OK it goes to a specific maintenance page hosted on a different server.
For example:
www.domain.com/app1 --> maintenance.domain.com/app1_site
www.domain.com/app2 --> maintenance.domain.com/app2_site
Currently I'm using an iRule:
when LB_FAILED {
if { [active_members [LB::server pool]] !=0 } {
} else {
HTTP::fallback "HTTP://maintenance.domain.com/app1_site" }
}
But this works only for the whole virtual instance www.domain.com.
Thanks in advance for any info.
- hoolio
Cirrostratus
Hi,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" } }
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