moved redirect   from handlers to router