dynamic changing of rest hostname