fab_catalano_10
Apr 03, 2008Nimbostratus
help with HTTPs redirect
hi all,
I am fairly new to iRules and have pretty much learned everything from dfferent posts here. thanks!
What i am trying to do is based on source iP address redirect them to a site or pool, below is what i have so far and it works great for http requests but fails for https.
I added an SSL cert to the VIP and not it is also working for HTTPs, what i wanted to know was if there was a way via iRules to redirect an HTTPs request based on source iP address without terminating the tunnel on the F5...
when HTTP_REQUEST {
if { [matchclass [IP::client_addr] equals $::datagroup1] }{
HTTP::redirect "https://mysite.com"
} elseif { [matchclass [IP::client_addr] equals $::datagroup2] }{
HTTP::redirect"http://myothersite.com"
} else {
HTTP::redirect "http://mydefaultsite.com"
}
}