URI Redirect with server pool condition
Hi Dev/central,
First of all, thanks for all of your assistance up until this point but I can't find anything to fit the bill on this one.
Description of the problem:
We have a single VS, which load balances a number of web applications via the LTM policy. We are using cookie persistence which is breaking one of our applications when chrome automatically requests /favicon.ico from the root directory when a new tab is opened. The larger problem will be resolved in work coming up but I'm looking for a quick fix as it's affecting users.
Essentially what I'm trying to achieve with an iRule is to redirect /favicon.ico to /other/favicon.ico, only when it's requested to a particular pool which I believe would look something like this, however it's not working.
when HTTP_REQUEST {
if { [[LB::server name] equals poolname] }{
if { [string tolower [HTTP::host]] eq "www.website.com" and [HTTP::path] eq "/favicon.ico" } {
HTTP::respond 301 Location "https://www.website.com/other/favicon.ico"
}
}
Any help is greatly appreciated.
- Benjiman