Forum Discussion
wkirk
Nimbostratus
Jan 26, 2018Using wildcard for multiple URI
We have an existing iRule and datagroup,
when HTTP_REQUEST {
set uri [HTTP::uri]
if {[class match $uri starts_with DG1]} {
pool POOL_SSL
}
if {[class match $uri eq DG_EXACT] or $uri eq "/"...
Stanislas_Piro2
Cumulonimbus
Jan 26, 2018This code may replace all irules!
when HTTP_REQUEST {
set uri [HTTP::uri]
set target [getfield [HTTP::uri] "/" 2]
if {[class match $uri starts_with DG2]} {
pool POOL_OTHER1
} else {
switch -glob -- [HTTP::uri] {
"*/other2*" -
"/other2_1*" -
"/other2_1*" {
pool POOL_OTHER2
}
"/other3*" -
"/other3_1*" -
"/other3_2*" -
"/" {
pool POOL_OTHER3
}
"/other3_3*" {
pool POOL_OTHER3_3
}
"/3_4*"{
pool POOL_OTHER3_4
}
"/3_5/" {
pool POOL_OTHER3_5
}
"/3_6/" {
pool POOL_OTHER3_6
}
default {
pool POOL_SSL
}
}
}
}
when SERVER_CONNECTED {
if { [LB::server pool] eq "POOL_OTHER2" } {
SSL::disable serverside
}
}
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