reldar_76465
Nimbostratus
Jul 13, 2011redirect mobile devices
Hi,
I'm looking for a script that will enable us to redirect all traffic coming from mobile devices to a mobile site.
Many thanks for the help.
Roy
This one will redirect for blackberry or ipad, and log the User-Agent any other devices.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::header User-Agent]] {
"*blackberry*" -
"*ipad*" {
HTTP::redirect "http://m.mysite.com/[HTTP::uri]"
return
}
default { log local0. "Device Access Attempt [HTTP::header User-Agent]" }
}
}