Sep 01, 2017
Set Server SSL Profile Based on URI
Hi all
We have a need to set a specific Server SSL Profile based on the requested URI for a HTTPS VS. I have searched around and there appear to a number of example iRules that could/should do the trick but I seem to be failing.
I have concocted this little gem based on an almagamation on my findings, however, it does not seem to work:
when HTTP_REQUEST {
set uri [HTTP::uri]
}
when SERVER_CONNECTED {
if {$uri equals "/uri1" } {
SSL::profile SERVER-SSL-1
}
elseif {$uri equals "/uri2" } {
SSL::profile SERVER-SSL-2
}
}
I feel I'm probably missing something fundamental here. Any clues would be really helpful.
I have applied the default Server SSL profile to the VS as I believe this is required for SSL profile switching.
Thank you.