use a trie for matching URLs

avoid O(N) prefix matching
test url trie