fixed #38 created redirect handle method to control the execution order