added pre, post support to redirect