Distributed rewrite rules