Author Topic: Mobile Users Redirection  (Read 2979 times)

Offline jmelika

  • Administrator
  • Hero Member
  • *****
  • Posts: 339
  • Karma: 7
Mobile Users Redirection
« on: October 22, 2007, 11:14:30 PM »
jjt8572 asked me about setting up the NetScalers to redirect users accessing his site using mobile phones to a new URL.  I thought I'd share this with everyone, so here it is.

Setup a Filter Policy
From the GUI, go to Protection Features/Filter and add a new ACTION with the following info (go to the action tab first)

Name: redirect_mobile
Qualifier: errorcode 200
Response Page:
<meta http-equiv="refresh" content="0;url=http://www.yourdomain.com/mobile">


Now create a new Filter Policy to use that action

Name: policy_mobile
Request Action: redirect_mobile (the one we created above)
Expression:
REQ.HTTP.HEADER User-Agent CONTAINS Windows CE || REQ.HTTP.HEADER User-Agent CONTAINS iPhone || REQ.HTTP.HEADER User-Agent CONTAINS BlackBerry




This should take care of all the major phones out there.  For a more comprehensive list, please go to http://www.zytrax.com/tech/web/mobile_ids.html and scroll down to Telephones & PDAs

Offline SnM77

  • Contributor
  • *
  • Posts: 3
  • Karma: 0
Re: Mobile Users Redirection
« Reply #1 on: September 18, 2009, 06:46:00 AM »
I am trying to re-direct all my mobile users using this, but I cannot seem to create the Policy.  I created the action just fine, I used the Advanced Free Form to create the Expression in the policy:
REQ.HTTP.HEADER User-Agent CONTAINS Windows CE || REQ.HTTP.HEADER User-Agent CONTAINS iPhone || REQ.HTTP.HEADER User-Agent CONTAINS BlackBerry
but when I click Create, I get an error dialouge that simply says Invalid Rule.  I am running version 9.1 and am NOT an advanced user.  What am I likely to be doing wrong? 

Offline jmelika

  • Administrator
  • Hero Member
  • *****
  • Posts: 339
  • Karma: 7
Re: Mobile Users Redirection
« Reply #2 on: September 18, 2009, 08:29:47 AM »
Thanks for catching that bug, SnM77.  It looks like it doesn't take Windows CE nicely because of the space.  Windows CE needs to be in single quotes, so the policy should say:

Code: [Select]
REQ.HTTP.HEADER User-Agent CONTAINS 'Windows CE' || REQ.HTTP.HEADER User-Agent CONTAINS iPhone || REQ.HTTP.HEADER User-Agent CONTAINS BlackBerry
JM

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 373
  • Karma: 22