determine url and type