Forum Discussion
pgsmith_120398
Jan 14, 2014Altostratus
Sorry page redirect
Im trying to set up an iRule that will redirect traffic to an IIS server when there are no active pool members. I have the basics working. However the sorry page will only display properly the first ...
IheartF5_45022
Jan 15, 2014Nacreous
Hi pgsmith,
There best way is to methodically approach this. You need to be able to debug, so use the developer tools in Chrome/Firefox or HTTPWatch (IE/Firefox) or some other tool, so you can see which request are not being responded to.
Next a suggestion, you said you don't want to see a URL Host change, but how about a URL Path change? You could redirect to http://[HTTP::host]/sorry
when CLIENT_ACCEPTED {
set def_pl [LB::server pool]
}
when HTTP_REQUEST {
if {[HTTP::path] eq "/sorry" || [HTTP::header "Referrer"] ends_with "/sorry"} {
pool /ESI/solr.erp-pool
} elseif { [active_members [LB::server pool]] < 1} {
HTTP::redirect "http:://[HTTP::host]/sorry"
return
} else {
pool $def_pl
}
}
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