generate a url-encoded URL