Added optional redirect on rule failure