Forum Discussion

Wasim_Hassan_13's avatar
Wasim_Hassan_13
Icon for Nimbostratus rankNimbostratus
Jul 02, 2018

Redirect iRule with CAPTCHA

Hi,

 

We are having one URL where we want to enable the CAPTCHA. We are able to get the CAPTCHA but redirection of the URL is not working. If we disable the CAPTCHA then website will work fine through the F5.

 

we are unable to merge the CPATCHA irule with the with the redirection irule.

 

Working irule for the F5 VIP.

 

Redirection URL.

 

when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "bitest.abc.com" } { if { [HTTP::uri] equals "/" } {

 

HTTP::redirect "https://[HTTP::host]/ibmcognos/bi/" } pool PL_BITEST } }

 

For the CAPTCHA below link followed.

 

https://devcentral.f5.com/codeshare?sid=534

 

Please assist how we can achieve this in F5 LTM.

 

  • Hey, are you doing two iRules to this, one to captcha and one to redirect? If so, did you tried to set low priority on the iRule to give redirection first and then disable events to captcha rule? I don't know exactly what you have tried before, so, it is just shot.

    when HTTP_REQUEST priority 300 { 
        if { [string tolower [HTTP::host]] equals "bitest.abc.com" } { 
            if { [HTTP::uri] equals "/" } {
                HTTP::respond 302 noserver Location "https://bitest.abc.com/ibmcognos/bi/" Connection close
                event disable all
                return
            }
            pool PL_BITEST
        } 
    }
    

    Regards