Fixed correct URL rewriting for external\remote modules and local modules