client-only rewrite