uri utility function to convert ip addr