update snippet
support redirect