split site url and rest endpoint