title: rewriting url for tablet and smart phone
body: <p>I'm using Apache's rewrite url. .htaccess file contains following redirect rules. My requirement is that, when ever I hit on the url <code>www.temp.com/card</code>, based on the device it should internally call that particular <code>.do</code>.</p>
  
  <p>For Example, from a smart phone if i type <code>www.temp.com/card</code> internally it should call  <code>www.temp.com/pa/spCard.do</code>.</p>
  
  <p>I tried with the below rules but problem is that some tablets having android, so in tablet it always going into smarphone <code>.do</code>.</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
  RewriteRule ^card/?$ /pa/spCard.do?uri=$1 [QSA]
  
  RewriteCond %{HTTP_USER_AGENT} "ipad" [NC]
  RewriteRule ^card/?$ /pa/tabCard.do?uri=$1 [QSA]
  
  RewriteRule ^card/?$ /pa/webCard.do?uri=$1 [QSA]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Is there any way we can distinguish between an Android mobile and tablet (using user agent string)?</p>