Lucilius_223799
Jan 14, 2016Nimbostratus
Redirect issue (Global http to https but one website)
Hello everyone,
My goal was to redirect everything to https but one website. This website has to stay on http.
I have with some looking around and working up created the following code:
when HTTP_REQUEST {
switch [string tolower [HTTP::host][HTTP::uri]] {
"http://www.abc.com/xyz/def"
{
return
do nothing
}
default {
HTTP::respond 302 location "https://[HTTP::host][HTTP::uri]"
event disable
TCP::close
}
}
}
The issue I have is that www.abc.com/xyz/def is suffering from "Too many redirects loop" is this due to the code being erroneous? This is the only iRule currently attached to the virtual server.
Any help would be appreciated and thank you in advance!