Added config parameter for redirecting