Pulls redirect into if statement