Different browser/devices do require a special handling from time to time to ensure the content fits the screen or matches the browser type. Mobile devices have smaller screens and it is good practice to use a different page layout to make a web site useful for these users.
We are going to create a rule that will forward anything from a Windows CE or Windows Mobile device to a different real server(s) that is providing some variance in application service (like different page layout or different object sizes) for those mobile users . Other users will default to accessing real servers(s) for other clients (e.g desktop based users etc.)
In a packet capture from a Windows Mobile 6 smart phone we can see the User-Agent string.
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.12) HTC-SMT5800\r\n
We will match on IEMobile for the Windows Mobile Devices and Windows CE for the legacy devices and forward to a server group-id 2. Anything that does not match will go to the default group-id 1.
Of course this could be expanded to other devices such as BlackBerry or iPhone. A BlackBerry User-Agent string looks like this:
To verify that rules are being hit, check the output of show csw-p "policy name". See below
SI400-21/2#show csw-p p1
Policy Name :p1 Policy index :1 Reference Count :1 total received packe:0 created session :0 total scanned packet:0 no session drop :0 no session frag drop:0 send mirror ip packe:0 send mirror packet send redirect packet:0 case-insensitive :TRUE