Determine webAppPath from window.location.
even simpler without the hostname

as explained in the Backbone doc:
http://backbonejs.org/#History-start