Safe redirect on error page