Forum Discussion
Shivesh_Rege
Nimbostratus
Jun 02, 2009irule causing loop.
Hi Friends,
I am facing an issue with an irule going into loop.Could someone help me resolving it.
when LB_FAILED {
if{[active_members [LB::server]]<1}
HT...
Jun 02, 2009
The sections where you are checking for the host names and then redirecting to the same hostname will almost certainly cause a recursive loop.
elseif {[string tolower [HTTP::host]] contains "join" } {
HTTP::redirect "http://[HTTP::host]/ecom/pages/nm/join.jsp"}
elseif {[string tolower [HTTP::host]] contains "MysteryBookOffer" } {
HTTP::redirect "http://[HTTP::host]/ecom/nm/link/home?YSID=1129&YTYP=net&YTID=BN4_02_k8_E66"}
elseif {[string tolower [HTTP::host]] contains "historybookclub" } {
HTTP::redirect "http://[HTTP::host]ecom/nm/link/home?YSID=1128&YTYP=net&YTID=BN3_02_h7_E65"}
elseif {[string tolower [HTTP::host]] starts_with "www" or "www1"} {
HTTP::c"http://[HTTP::host]/ecom/pages/nm/nmhomepage.jsp"}
It's bad practice to redirect to the same hostname that will cause a subsequent redirect. You will need to limit your comparisons down and/or add some exclusions to your logic so that the redirects you submitted will not trigger further redirects.
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
