Rules format - upgrade from 4.x to 9.x

We are in the process of upgrading from version 4.x to 9.x

Can someone help me and tell whether i have to do any changes to my Rule from version 4.x before i put it n the version 9.x?

thanks in advance for any help.

if (server_port == 80) {

redirect to “https://%h/%u”

}

else {

use pool Notes8-Test-Pool

}

thanks,

how about this one? Also, is there a way that i can put line comments withing iRule code? whatg would be the syntax?

thanks in advance

=======================================

when CLIENT_ACCEPTED {

set tmm_auth_ssl_cc_ldap_sid [AUTH::start pam default_ssl_cc_ldap]

}

when CLIENTSSL_CLIENTCERT {

AUTH::cert_credential $tmm_auth_ssl_cc_ldap_sid [SSL::cert 0]

AUTH::authenticate $tmm_auth_ssl_cc_ldap_sid

SSL::handshake hold

}

when AUTH_SUCCESS {

if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]} {

SSL::handshake resume

}

}

when AUTH_FAILURE {

if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]} {

reject

}

}

when AUTH_WANTCREDENTIAL {

if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]} {

reject

}

}

when AUTH_ERROR {

if {$tmm_auth_ssl_cc_ldap_sid eq [AUTH::last_event_session_id]} {

reject

}

}

======================================================================================

thanks for help. I tried to install this and got an error, so what needs to be fixed?

01070151:3: Rule [notes8_1-redirect-rule] error:

line 1: [wrong args] [when HTTP_REQUEST ]

line 2: [undefined procedure: if { [TCP::local_port] eq “80” }

{ HTTP::redirect “https://[HTTP::host][HTTP::uri]”

}

else { pool Notes8-Test-Pool }

] [{ if { [TCP::local_port] eq “80” }

{ HTTP::redirect “https://[HTTP::host][HTTP::uri]”

}

else { pool Notes8-Test-Pool }

}]

iRules is standard TCL so you can use the ‘’ to delimit a line that is a comment. Documentation for the TCL language is at this link:

Click here

-Joe