Cleanup as rewrite rule protects