Added replaceLocation to the router.