Forum Discussion

cxcal_18687's avatar
cxcal_18687
Icon for Nimbostratus rankNimbostratus
Nov 13, 2008

Failing iRule

I've been eye-balling this irule and figure out why its failing to execute when I use the irule for the VIP. It should redirect http to https. When I use the pool for the VIP it works fine for http. Any advice?

 

 

Also, is there any way to monitor the number of times a irule has been used. I know this is done in 9.x

 

"b rule show"

 

 

 

if (http_uri starts_with "/Rebate/" and not (http_header("WL-Proxy-SSL") == "true")) {

 

redirect to "https://www.site.com/%u"

 

}

 

else if (http_uri ends_with "/" and not (http_header("WL-Proxy-SSL") == "true")) {

 

redirect to "https://www.site.com/Rebate/%u"

 

}

 

else if (http_uri == "/" and not http_header("WL-Proxy-SSL") == "true") {

 

redirect to "https://www.site.com/Rebate/"

 

}

 

else {

 

use pool Rebate

 

}

 

 

 

 

  • James_Quinby_46's avatar
    James_Quinby_46
    Historic F5 Account
    cxcal -

     

     

    One way to track irule usage (especially while debugging) is to toss some logging statements in there. Have you looked at the HTTP headers while logging in to see if anything shows up there? You can do this at the browser with HTTPWatch or LiveHTTPHeaders, or on the LTM itself with an irule like this one:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/LogHttpHeaders.html