Add redirection with conditionals