Ashu_2116
Jun 26, 2018Nimbostratus
i_rule help
We have 5 urls mapped to one IP (VS) under different LB pools & all are working on http. So if request is http://abc.com it redirects to its respective LB pool. one out of 5 url is moving to https now. So other 4 are still working on http with their resepctive LB pools. So i need to create a i-rule so only that url auto redirected to https & rest stay & work as is with their default LB pool on http.
Below is my proposed i-rule. Can anyone check if it is ok ?
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "abc.com" } { HTTP::respond 301 Location "https://abc.com[HTTP::uri]" }
Determine the Hostfieldset hostname [string tolower [HTTP::host]]
Determine ther original URI
set uri [string tolower [HTTP::uri]]
switch -glob $hostname {
"xyz.com" {
pool pool_xyz.com
}
default {
pool pool_jkl.com
}
}
}