Cut irrelevant ends of URLs