Forum Discussion
muzammil_88686
Nimbostratus
Mar 03, 2013Non Smartphone iRule
Dear Dev Team,
Could you pls let me know the Irule for "Non-Smartphone" devices?
If the "Non-Smartphone" device initiates the traffic to "mobile.xyz.com" it should redirect the traff...
muzammil_88686
Nimbostratus
Mar 03, 2013Thank you for your response!
I have a rule as below
=========
switch [string tolower [HTTP::path]] {
"/"
{
if { [class match [string tolower [HTTP::header User-Agent]] contains Mobile_Datagroup ] } {
HTTP::redirect "http://www.xyz.com/mobile"
log local0. "[IP::client_addr]:[TCP::client_port]: UA: [HTTP::header User-Agent], Mobile Device Detected"
}
else {
HTTP::redirect "http://www.xyz.com/index" }
}
class Mobile_Datagroup {
{
"BB10"
"Motorola"
"android"
"bb10"
"blackberry"
"htc"
"iphone"
"lg"
"nokia"
"palm"
"samsung"
"sonyericsson"
"symbian"
"vodafone"
}
}
=========
Currently the above rule is working fine with"Smartphones".
In similar way, we would like to detect "Non-Smartphone" device which initiates the traffic to "mobile.xyz.com" and it should redirect the traffic to "www.xyz.com"
Could you pls suggest me with the irule?
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects