iRule for getting hostname incase of HTTPS

Hello, We have couple of servers running different web applications on port 443 and 8443. I want to route traffic to those servers checking the headers. For HTTP traffic, the following iRule worked for me. I am not sure about HTTPS:-

when HTTP_REQUEST { if { [HTTP::host] eq “abc.example.com” } { pool abc-pool } elseif { [HTTP::host] eq “def.example.com” } { pool def-pool } }

If you could kindly also explain the virtual server configuration in this case, it would be great. Appreciate you help.

Hi,

If the virtual server is configured with client ssl profile, you can use the same irule.