Made redirect status code configurable