Add replacePath method in router on server

Add replacePath method in router on server