fix path rewrite using config