use URI to solve the no host name error