Matching all routes and switching to history