Forum Discussion

BaltoStar_12467's avatar
Dec 26, 2013

BIG-IP : redirect loop : debugging techniques

BIG-IP 11.4.0 Build 2384.0 Final

In my hosts file I point

www.mydomain.com
to my web-server IP, and in my client-browser I submit the request

http://www.mydomain.com/natural-language-url-1

and the page is returned as expected..

In BIG-IP , I have configured a single virtual-server

vip-01
with a single iRule
irule-01
:

when HTTP_REQUEST {
  log local0. "HTTP_REQUEST received by irule-01"
  log local0. "host = [HTTP::host]"
  log local0. "uri = [HTTP::uri]"
  switch -glob [string tolower [HTTP::host]] {
    "www.mydomain.com" {
      switch -glob [string tolower [HTTP::uri]] {
        "/api/*" {
          pool service-pool-01
        }
        default {
          log local0. "matched default pool"       
          pool default-pool-01
        }
      }
    }
  }
}

Now, in my hosts file I point

www.mydomain.com
to
vip-01
, and in my client-browser I submit the request

http://www.mydomain.com/natural-language-url-1

and the client-browser reports an infinite-redirect error

"This webpage has a redirect loop"

BIG-IP > System > Logs > Local Traffic

Rule /Common/irule-01 : HTTP_REQUEST received by irule-01`
Rule /Common/irule-01 : host = www.mydomain.com
Rule /Common/irule-01 : uri = /natural-language-url-1
Rule /Common/irule-01 : matched default pool

... repeat 10 times ...

Fiddler shows that 21 302-redirects have occurred :

Result          302
Protocol        HTTP
Host            www.mydomain.com
URL             /natural-language-url-1
Body            185
Caching         private
Content-Type    text/html; charset=utf-8
Process         chrome:7516
Comments
Custom  

NOTE 1 : on vip-01, Source Address Translation = Auto-Map

NOTE 2 : I have complete control over the web-server ( remote access with ability to modify configuration, run diagnostics, perform local tests, etc. )

NOTE 3 : The web-server expects the request to include the domain. Sending a request with host = {web-server-host-name} , or host = {web-server-ip} will throw an error because IIS will be unable to locate the virtual app.

What are some debugging techniques I can deploy to further diagnose the underlying cause of the redirect loop ?

28 Replies