cosmetic modification on REST URL building (now it always changes its base URL according to the requests URL)