Valentine_96813
Nov 07, 2012Nimbostratus
Redirect 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 they are present. I tried several different rules. My last one here, I split everything out into specifc lines. Maybe I just cannot see the forest through the trees today.
when HTTP_REQUEST {
These requests go to specified maintenance page if conditions are met otherise go to default page
if { ([active_members [LB::server pool]] == 0 && [string tolower [HTTP::host]] starts_with "abc.webserver.com") } {
HTTP::redirect "http://sorrypage.net/default_api.aspx"}
if { [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"} }