onRequest() function the logic needed to find out which URL path