rewrite, traverses any depth directory structure