gpt4 book ai didi

.htaccess - 在.htaccess重定向中的url链接上打开Goog​​le Play商店/Apple App Store

转载 作者:行者123 更新时间:2023-12-02 05:49:01 25 4
gpt4 key购买 nike

我想将用户从Android和iOS重定向到相应的市场以安装应用。如果我的URL中包含字符串“mobile”,那么我想直接打开市场。但是我没有弄清楚必须如何给出URL。到目前为止,我只重定向到网络版本的市场。我以为应该是market://?

这是我到目前为止所得到的:

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]

最佳答案

您是否尝试链接到App Store / Google Play上的应用程序?在您的示例中,“apple.com”和“play.google.com”将带您进入Apple和Play商店首页。您应该为商店中当前的应用程序提供有效的URL。如果该应用尚未在商店中出售,则可以尝试使用当前在线的应用。看一眼:

  • How to link to apps on the app store
  • How to open the Google Play Store directly from my Android application?
  • 关于.htaccess - 在.htaccess重定向中的url链接上打开Goog​​le Play商店/Apple App Store,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36175273/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com