Forum Discussion

peter_56193's avatar
peter_56193
Icon for Nimbostratus rankNimbostratus
Jul 23, 2012

irule/asm for mobile device

HI

 

 

i am working on a project to redirect mobile traffic. i created mobile agents contain mobile device key word:" ipone, android....."

 

 

condition 1 :

 

 

if detect request from mobile device; add string "&reqAgt=mobe" at the end and forward to same server.

 

 

so the irule i setup is

 

rule test1 {

 

 

when HTTP_REQUEST {

 

 

if { !([HTTP::uri] contains "reqAgt") }

 

 

{

 

 

if { [class match [string tolower [HTTP::header User-Agent]] contains MobileAgents] }

 

 

{

 

 

HTTP::redirect https://[HTTP::host]/[HTTP::uri]&reqAgt=mobe

 

 

}

 

 

}

 

 

}

 

 

}

 

 

 

condition 2

 

 

if the mobile user want to view full site, how can i redirect it back to original request.

 

 

 

ASM, i have ASM, if i add string at the end, what action i should do to allow the reqeust, "accept parameter"?

 

 

 

thanks

 

 

No RepliesBe the first to reply