Forum Discussion

MaximS_168794's avatar
MaximS_168794
Icon for Nimbostratus rankNimbostratus
Sep 03, 2014

Help with iRule for redirect from abc.com to url abc.com/a/aasa/sss/

Help please. I'm stuck.When i write

 

if { [HTTP::host] eq "abc.com" } then { HTTP::redirect "https://abc.com/aaaa/bbbb/cccc" return }

 

I get an infinite loop :(

 

How do I properly write this rule ???

 

3 Replies

  • can you try this?

      if { [HTTP::host] eq "abc.com" and [HTTP::path] eq "/" } { 
        HTTP::redirect "https://abc.com/aaaa/bbbb/cccc" 
        return 
      }
    
  • i'm already use this iRule

     

    if { [HTTP::host]] eq "abc.com" && [string tolower [HTTP::uri]] equals "/" }{ HTTP::redirect "https://abc.com/a/aaaa/aaaca/" return }

     

    but - thanks a lot for help. big 10x!

     

  • You need to use the developer tools in the browser (or log responses in HTTP_RESPONSE) to see what's coming back from the server to cause the redirect loop.