get base from a url