Adding function to check ip address and function for matching a url