Forum Discussion

Mirko_Rostedt_6's avatar
Mirko_Rostedt_6
Icon for Nimbostratus rankNimbostratus
Jan 09, 2006

HTTP vs HTTPS redirect

Hello,

 

 

Could someone please help me with this one.

 

I have two virtual services, one for http and one for https. I exactly similar iRules to both expect second statement has redirect to https url. This iRule works only in http side. Here is the rule:

 

 

when HTTP_REQUEST {

 

if { [HTTP::host] equals "www.aaa.com"} {

 

HTTP::redirect "http://www.bbb.com/message"

 

}

 

elseif { [HTTP::host] ne "www.ccc.com"} {

 

HTTP::redirect "http://www.ccc.com[HTTP::uri]"

 

}

 

 

So in http Virtual server everything works fine, but in https I get following error message to log:

 

TCL error: Rule www-ssl-new2 - can't use non-numeric string as operand of "!" while executing

 

 

Something wrong with operator that I use but I really can't see what.

 

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Could you please post the actual rule that the system is complaining about, instead of an example? We'll need to see the exact syntax that's being used to determine what's throwing the error.

     

     

    Thanks,

     

    -Colin