OCC_68606
Jun 14, 2011Nimbostratus
iRule Redirect Mobile Site
I have this iRule to identify mobile browser, for example apple devices:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] contains "www.mainsite.com" } {
switch -glob [string tolower [HTTP::header User-Agent]] {
"*iphone*" -
"*ipod*" -
"*ipad*" {
HTTP::redirect "http://mobilesite.com[HTTP::uri]"
return
}
}
}
}
mobilesite.com has a link to www.mainsite.com (In case you don´t like be in mobile site)
I want to do something that manage if you are in mobile site and you want to go to main site the iRule does not enter in a loop.
Any ideas??
Jorge.