Joseph_Johnson_
Feb 27, 2015Nimbostratus
iRule redirect to mobile site
Hi,
I'm trying to create an iRule that will redirect users to site "www.mobilesite.com/slm/faces/m/index.jspx" if on mobile device else redirect to "https://mysite.com/OLA/faces/siteLocator.jspx". So far I have:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] contains "www.mobilesite.com"}{
switch -glob [string tolower [HTTP::header User-Agent]] {
"*ipad*" -
"*iphone*" -
"*android*" -
"*windows phone*" -
"*windows ce*" -
"*bada*" -
"*bb10*" -
"*blackberry*" -
"*symbinos*" -
"*symbain os*" -
"*symbian*" -
"*java*" -
"*winowsphone*" -
"*windowsce*" {
HTTP::redirect "www.mobilesite.com/slm/faces/m/index.jspx"
return
}
}
}
}