Jon_Singh
Jan 23, 2014Altostratus
irule http to https redirect with a little nuance
Hi Everyone,
I was hoping for a hand, I'm working on a irule that says: if you reach http://sysdev redirect to https://sysdev.x.com/login.aspx
otherwise, if someone has a bookmark to http://sysdev/form1.aspx redirect to https://sysdev.x.com/form1.aspx
So this is what I have:
when HTTP_REQUEST {
if { [HTTP::uri] == "/" } {
HTTP::redirect https://sysdev.x.com/login.aspx
}
else {
HTTP::redirect https://sysdev.x.com[HTTP::uri]
}
}
Would this work? I cant find much documentation on 'else' only on 'elseif' - any help would be appreciated.