iRule not get triggered.
Hi Experts,
I'm facing an issue which I want your kind assistance, I will explain the issue in details, so please excuse me for being so long.
in our environment we have an application working in port 80 and 8080, so I have two VS's in port 80 and 8080, both VS's associated with the same pool members, and both VS's have below iRule for redirection:
when HTTP_REQUEST {
if { [HTTP::host] contains "abc" and [HTTP::path] eq "/" } {
HTTP::redirect "http://abc.xyz.com/otcs/cs.exe?func=llworkspace"
}
}
the application working fine since years, recently I have been requested to use ssl certificate for this app, so I did below steps:
1- created two VS's in port 443 and 8443, with the same IP's which used in port 80 and 8080 and same pool members.
2- assigned the ssl certificate to VS in port 443.
3- disabled the old VS's (80 & 8080).
4- assigned below iRule for redirection:
when HTTP_REQUEST {
if { [HTTP::host] contains "and" and [HTTP::path] eq "/" } {
HTTP::redirect "https://abc.xyz.com/otcs/cs.exe?func=llworkspace"
}
}
During testing, I observed the redirection is not happening, the aim of this redirection to allow the users only to write abc and hit enter, then he should be able to open the full url.
some friends suggested to use or instead of and in the iRule, which am still confuse.
please your advice and guidance.