For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Almassud_221797's avatar
Oct 12, 2016

Any ideas on how to prevent the loop?

Good morning all,

 

I am working with an iRule that's normally easy, but not this time. Here's why:

 

when HTTP_REQUEST { if { [string tolower [HTTP::host]] ends_with "host.domainname.com" } { HTTP::respond 301 Location "https://host.domainname.com/uri/page.html" }}

 

what's happening here's that the iRule is running in to a redirect loop and thus failure.

 

Any ideas on how to prevent the loop?

 

Thanks in advance

 

1 Reply

  • So just out of curiosity,

    when HTTP_REQUEST { 
        if { [string tolower [HTTP::host]] ends_with "host.domainname.com" } { 
            HTTP::respond 301 Location "https://host.domainname.com/uri/page.html" 
        }
    }
    

    are you redirecting to this same VIP? If so then you're basically saying

    if host == "foo.com" then goto foo.com
    

    What are you trying to achieve? Just guessing here, but are you trying to redirect to a given URL if the user doesn't enter a URL?

    when HTTP_REQUEST {
        if { [HTTP::uri] eq "/" } {
            HTTP::respond 301 Location "https:/host.domainname.com/uri/page.html"
        }
    }