correct rewritebase