implement the redirect api for Controller