iRule Causing SSL Problems
Here's an abridged version of our mobile detection script. Not sure where it is getting hung up. I tried wrapping the mobile detection with something like if { [TCP::local_port] != 443 } { ... } but that didn't seem to help. Is there something I should do before the HTTP_REQUEST to check for SSL and ignore the rest?
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" and not [HTTP::cookie exists "hide-mobile"] } {
switch -glob [string tolower [HTTP::header User-Agent]] {
"*android*mobile*" -
"*iphone*" -
"*ipod*" -
"*kindle*" {
HTTP::redirect "http://m.[domain [HTTP::host] 2]"
return
}
}
if { [string tolower [HTTP::header Accept]] contains "vnd.wap.wml" } {
HTTP::redirect "http://m.[domain [HTTP::host] 2]"
return
}
}
}