redirect invalid search to root path with flash notices