Forum Discussion

N__197982's avatar
Icon for Nimbostratus rankNimbostratus
Sep 14, 2017

looking for help to tweak iRule

Folks, We have an iRule which looks at the HTTP request and does some work based on that request.


Here is the extract: if { [HTTP::host] contains ""}


and then do this do that. I want to add one more clause in the same statement saying if HTTP::host contains and the requests is on SSL.


How can I do that?


Thanks, N.


2 Replies

  • use one of the followings:

    if { [HTTP::host] contains "" && [SSL::mode] == 0 }


    if { [HTTP::host] contains "" && [TCP::local_port] == 443 }
  • Hi,


    the question is WHY?


    when you configure a virtual server with an irule, you may know if the server is SSL or not.


    I tried the SSL::mode command and it don't work if CLIENTSSL or SERVERSSL profiles are not assigned to the VS.