added statement if there is no URI segments in the URL