Category Archives: app-store

Open google play store / appel app store on url link in .htaccess redirect

I want to redirect users from Android and iOS to the corresponding market to install an app. I want to open the market directly if in my URL is the string "mobile" present. But i didn't figured out how the URL must be given. Till now i only redirect to the web version of the markets. I thought should be something like market://?

Here is what i got so far:

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} "iphone|ipod|ipad" [NC]
RewriteRule ^(.*)mobile(.*)$ http://www.apple.com [R=301,L]

#redirect to android market
RewriteCond %{HTTP_USER_AGENT} "android" [NC]
RewriteRule ^(.*)mobile(.*)$ https://play.google.com/[R=301,L]