Forum Discussion
Persistance iRule
when HTTP_REQUEST {
log local0.debug "using persistence"
switch -glob [string tolower [HTTP::path]] {
"/client" { pool athoc_pool_1 }
default {
persist none
HTTP::redirect "http://[HTTP::host]/csi"
log local0.debug "using redirect"
}
}
/client needs to have a * after it otherwise it will match anywhere in the string. "/client*"
You redirect to the same VIP with /csi so this will fall though to the redirect again hence the infinite loop.
If you really want everything that does not match /client* to be redirected to /csi then this should do it.
when HTTP_REQUEST {
log local0.debug "using persistence"
switch -glob [string tolower [HTTP::path]] {
"/client*" { pool athoc_pool_1 }
"/csi*" { persist none }
default {
HTTP::redirect "http://[HTTP::host]/csi"
log local0.debug "using redirect"
}
}
Kevin (Jarvil)
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