I have an Android application that declares an intent using a in-house protocol. You can launch it by opening a webpage that contains a link to :
myapplication://foo-bar
I want to an URL on my website that will anwser a 301 Redirect to that custom, in-house, made-up protocol. The idea is that our Android application will be launched when the user clicks on that link (the app is already installed).
I could simply add an anchro link in an HTML page, but I can't modify the HTML. I have to use Apache. I tried this mod_rewrite rule:
RewriteRule "^/app$" myapplication://foo-bar [R=permanent,L]
But it always prepend the host name in front, so I get this in the Location header:
Location: https://example.com/myapplication://foo-bar
How can I instruct mod_rewrite to use the URL as-is (myapplication://foo-bar
)?