Forum Discussion
Durga_Dash_2124
Nimbostratus
Jun 03, 2008Here is my final working irule, after cleaning out all the debugging and checking since I know how my virtuals will be built.
Single wildcard virtual server on port 'Any' with ClientSSL profile set and 'http' profile set. Also with a default pool on port 80 and port translation enabled...and cookie persistence.
------------------------------
when CLIENT_ACCEPTED {
if { [TCP::local_port] == 80 }{
set disable_cmd "SSL::disable"
eval $disable_cmd
}
elseif { [TCP::local_port] != 443 }{
reject
}
}
when HTTP_REQUEST {
if { [TCP::local_port] == 80 }{
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
if { [TCP::local_port] == 443 }{
HTTP::header insert SSLClientCipher [SSL::cipher name],\x20version=[SSL::cipher version],\x20bits=[SSL::cipher bits]
}
}
-----------------------------------
Thanks all for your help.