Forum Discussion
Valentine_96813
Nimbostratus
Nov 07, 2012Redirect on host and uri
Having some trouble with this redirect. I am trying to redirect to maint page globally on pool members being down. However, I need to redirect a certain url and a certain URI to a seperate page if ...
nathe
Cirrocumulus
Nov 07, 2012Valentine
How about this?
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 && [string tolower [HTTP::host]] starts_with "abc.webserver.com" }{
HTTP::redirect "http://sorrypage.net/default_api.aspx"
} elseif { [active_members [LB::server pool]] == 0 && [string tolower [http_uri]] starts_with "/identity/issue/oauth2/token"}{
HTTP::redirect "http://sorrypage.net/default_api.aspx"
} elseif { [active_members [LB::server pool]] == 0} {
HTTP::redirect "http://maintenance.cloudapp.net"
}
}
Hope this helps,
N
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
