Detect iPad using .htaccess

You can see that this code uses one of the available server variable which is User Agent and checking for the ipad using regular expression. If that condition satisfies then it will perform the redirection step just below it.

RewriteCond %{HTTP_USER_AGENT} ^.*iPad.*$
RewriteRule ^(.*)$ [R=301]


Share this snippet


Leave a Reply

Your email address will not be published. Required fields are marked *

Please respect the following rules: No advertising, no spam, no keyword in name field. Thank you!