handle URIs as well as URLs