Forum Discussion
URI Redirect with server pool condition
Not seen above iRule. But you can try something like this.
when CLIENT_ACCEPTED {
if { ([llength [active_members -list poolname]] < 1) and ([HTTP::path] eq "/favicon.ico") } {
HTTP::respond 301 Location "https://www.website.com/other/favicon.ico"
}
}Hi Samir,
Thanks for the quick response but unfortunately the iRule doesn't work. I received the following error when attempting to use it.
01070151:3: Rule [/Common/ASID103898_pool_redirect] error: /Common/ASID103898_pool_redirect:3: error: [command is not valid in current event context (CLIENT_ACCEPTED)][HTTP::respond 301 Location "https://www.website.com/other/favicon.ico"]
/Common/ASID103898_pool_redirect:2: error: [command is not valid in current event context (CLIENT_ACCEPTED)][HTTP::path]
Could I please also clarify that there's an LTM policy that utilises a lot of pools on this VS, the iRule has to be specific to the current session, so that it doesn't impact the other VS connections.
Thanks!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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