compile url to be able to match regexes for the url