Move redirect into template