Build urls tree.