I need to auto open page in chrome. This code opens in mobile chrome without any problems.
RedirectMatch 301 id/(.*)$ intent://remoteurl.com/cancel.php?id=$1#Intent;scheme=https;package=com.android.chrome;end But need this work only if user is on Android. So I have tried this but it doesnt redirect.
RewriteCond %{HTTP_USER_AGENT} (android) [NC] RedirectMatch 301 ^id/(.*)$ intent://remoteurl.com/cancel.php?id=$1#Intent;scheme=https;package=com.android.chrome;end The problem is, this url scheme won't work if RewriteRule is used,
RewriteRule ^i/(.*)$ intent://remoteurl.com/cancel.php?id=$1#Intent;scheme=https;package=com.android.chrome;end [R=301,L] but works with redirectMatch 301. However, redirectMatch 301 doesn't work if RewriteCond is used. So what is the correct way to do that ?
(Similar questions have already been asked, however this is for different url scheme intent://)