Fix #1302 : redirect mechanism does not work as expected