satish_txt_2254
Nov 02, 2017Cirrus
redirect https to other https with condition
I have following iRules, its bind with virtual server
VS_HTTPS
i wants if someone tyle https://devs.example.com
then it should redirect to https://dev.example.com
i have tried following but it didn't work.
in DNS dev and devs are both CNAME and they pointing to same F5 VIP
when HTTP_REQUEST {
if { ([HTTP::host] eq "dev.example.com") or ([HTTP::host] eq "devs.example.com") } {
devs -> dev
HTTP::redirect https://dev.example.com[HTTP::uri]
pool dev_pool
} elseif { [HTTP::host] eq "qa.example.com" } {
pool qa_pool
}
}
I am getting following error
$ curl -Ik https://devs.vivox.com
HTTP/1.0 302 Found
Location: https://dev.vivox.com/
Server: BigIP
Connection: Keep-Alive
Content-Length: 0