This probably isn't the most elegant solution out there, but... If you are using the viewer, and all the url's are in the xml config files, why not just have 2 versions of the application? One copy of the application goes in a folder for external with xml files pointing to the external-viewable url's, another copy of the application goes in a 2nd folder for internal with xml files pointing to the internal-viewable url's. If you update the application, you then just have to copy the application swf files to both directories (while not overwriting the xml files).
The application itself would be identical for both, just the config xml files would be different.