Site doesn't redirect iPhone and iPad anymore

Avatar
  • Answered
I have set up a mod_rewrite in the .htaccess file of my site earbeater.com. When the user agent is equal to iphone, it is supposed to redirect to a specific page, when it equals ipad to another page.

It has worked up until recently, so it's really strange that it doesn't work anymore. I hope you can help me. Here is what I have written in the .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ipad [NC]
RewriteRule ^online-ear-training/$ https://itunes.apple.com/us/app/earbeater/id724557406?mt=8 [R=302,L]
RewriteCond %{HTTP_USER_AGENT} iphone [NC]
RewriteRule ^online-ear-training/$ /earbeater-for-iphone/ [R=302,L]
Avatar
Scott
Hello,

The rewrite conditions above seem to be correct. Have you tested by redirecting to a simple test page on the same server or another website to ensure the issue is not in those specific rules?

Kindest Regards,
Scott M