def create redirect