Simplified the URLMapping logic and added case insensitivity to domain matching.