I'd like to post a URL on my site which, when clicked, either opens up my iphone app (if it's been installed on the phone), or, if the app hasn't been installed, opens up itunes with my application, to allow it to be installed.
This seems like a basic sort of thing that might be quickly done with a magic formula URL, but I can't seem to find the relevant documentation anywhere.