Thanks Steve - I can't replicate the issue here, and based on the code it shouldn't be happening, so I'm no sure what to suggest. Is this on your jamroom server?
You don't want 2 sites - that's way, way overkill for what you need.
When a visitor hits your site in your app how do you know? Is there a specific header or agent string that is used so you can differentiate an app client from a regular browser?
I'm not able to replicate this here - all the constant define() calls are wrapped in a !defined() check, so you should never see this. Are you running the latest version of the module? I've tested in Developer mode on one of my test sites and I don't see any issue.
andrusito:
I know that is the very best solution, but as I said the download links of my website don't work inside the app unless they have the prefix "external://"
So, i was looking for an alternative solution
It's not clear to me what you can't just do a string replace on the URL - i.e.
str_replace('http://', 'external://', $url);
The concept is the same regardless of the language you are using for your app.