Forum Discussion
neilclark
Nimbostratus
Feb 23, 2018iRules to select pools and SSL profiles
Hi Guys,
I have a requirement for the following and am wondering if it can be achieved with iRules?
I have a VIP configured and at the moment i have an irule that selects a pool to Loadbala...
oguzy
Cirrostratus
Feb 23, 2018Hi neilclark,
If your virtual server listens port 443 and server ssl profile selected by default, you can try the below code:
when RULE_INIT {
set ssl_state 1
}
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/xx/yyyy/" {
pool Pool1
}
"/AA/BB//CC" {
pool Pool2
$ssl_state 0
}
default { HTTP::respond 404 }
}
}
when SERVER_CONNECTED {
if { $ssl_state equals 0 } {
SSL::disable
}
}Also please check iRule Event Order - HTTPS/SSL - Client & Server Side
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
