Setup preview mode and redirect mode