I would like to prevent iPads from connecting to my server, and only allow iPhones. What is wrong with this mod_rewrite script that is allowing this?
#Prevent non-iPhones from connecting to the server.
#RewriteCond %{HTTP_USER_AGENT} !.*Apple-iPhone2C1.* [NC]
#RewriteCond %{HTTP_USER_AGENT} !.*Apple-iPhone3C1.* [NC]
#RewriteRule () http://www.xyz.com/ [R,NC,L]
#The next line prevents version 4.0
RewriteCond %{HTTP_USER_AGENT} .*801.293.* [NC]
#The next line prevents version 3.13
RewriteCond %{HTTP_USER_AGENT} .*705.18.* [NC]
#The next line prevents version 3.21
RewriteCond %{HTTP_USER_AGENT} .*702.405.* [NC]
#The next line prevents version 3.2
RewriteCond %{HTTP_USER_AGENT} .*702.367.* [NC]
#Require iPhones to be 3GS or iPhone 4.
RewriteCond %{HTTP_USER_AGENT} !.*Apple-iPhone2C1.* [NC]
RewriteCond %{HTTP_USER_AGENT} !.*Apple-iPhone3C1.* [NC]
The offending device has this for a user agent:
Apple-iPad1C1/803.148