handle route with no segments correctly