Intial HTTP request still goes to HTTPs redirection and later works properly.

Hi All,

Another wierd issue, I have applied below iRule, found that intially when http://test.test.com/testServlets/Payment is attempted it still gets redirected which we need to block. and then after that it works fine with no redirection. Please can someone help on this ?

when HTTP_REQUEST {

if { ([HTTP::uri] starts_with “/testServlets/Payment”) }{

discard

}

if { ([HTTP::uri] starts_with “/testServlets/GetImage”) or \

([HTTP::uri] starts_with “/testServlets/css/widgets” ) or \

([HTTP::uri] starts_with “/testServlets/css” ) or \

([HTTP::uri] starts_with “/testServlets/images” ) or \

([HTTP::uri] starts_with “/testServlets/images/widgets” ) or \

([HTTP::uri] starts_with “/testServlets/GetHistory” ) \ }{

pool Philips_NetTVTest

}

else { HTTP::respond 301 Location “https://[getfield [HTTP::host] : 1][HTTP::uri]” } }

Hi Arjun,

Can you try using reject to send a TCP reset instead?

when HTTP_REQUEST {

   switch -glob [HTTP::path] {
      "/testServlets/Payment*" {
         reject
      }
      "/testServlets/GetImage*" -
      "/testServlets/css*" -
      "/testServlets/images*" -
      "/testServlets/GetHistory*" {
         pool Philips_NetTVTest 
      }
      default {
         HTTP::respond 301 Location "https://[getfield [HTTP::host] : 1][HTTP::uri]"
      }
   }
}

Aaron