commonDir rewrite