Added option for disabling redirect