Forum Discussion

stephon_87914's avatar
Icon for Nimbostratus rankNimbostratus
May 12, 2011

HTTP::redirect causes infinite loop

Hello all,



We have written a iRule in attachment


But we found that results in an infinite loop while doing HTTP::redirect


Other functions (e.g: HTTP::retry) work fine



Would any one please help to resolve this issue?



Thanks a lot.






1 Reply

  • Hi Stephon,


    I took a quick look at the code. However, I think you are running into a loop because you are re-processing the redirect back into the iRULE and it's matching a statement that doesn't assume that the client is already being redirected the link.



    There are many different ways to stop this loop, however, the one that I think is the easiest is the following untested irule



    } elseif {!([HTTP::request] eq "") and ($lookup == 2) } {
        log local0.debug "No cdn [HTTP::host] [HTTP::uri]"
        HTTP::redirect ""




    I hope this helps