Add replacePath method in router on server