In our scenario we are developing a provider-hosted app for SharePoint 2013. For each on-premise SharePoint installation there will be a separate (remote) web application with a different URL. Hence, the the URL of the provider-hosted app including the App Parts of the app, cannot be a fixed URL.
Are there any ways to let the SharePoint Admin configure the URL prefix for a provider-hosted app? (e.g. through Power Shell or a SharePoint setting).
If possible, I would like to specify a placeholder as part of the URL, e.g. in the App Part such as "~remoteUrl/myReleativeWebAppUrl/service" and let the placeholder be replaced duringruntime through a SharePoint setting (the admin specified before).
I know there is the "~remoteAppUrl" parameter, but this only works for testing and is replaced during building the app.
At the moment I can only think about one workaround which is to change the URL before deploying the App manually or through a PowerShell scripts. But this would make the app impossible to be deployed to the store.
So to sum up, what is the best way to let the SharePoint admin configure the URL prefix / Domain of the provider-hosted app?
(I also asked the question here: http://sharepoint.stackexchange.com/questions/109317/is-there-a-way-to-dynamically-configure-the-remote-webapp-url-of-a-provider-host)
Thanks in Advance, Torsten