redirect according to type

redirect according to type