We currently have a little over 450 rewrite rules in our Apache config spanning 4 different files. As you can imagine, they are vital to the way our site operates.
We of course check all the rules we add, have them in git, and ensure that they maintain the correct ordering so as to not step on each other's toes, but with a growing set of rules due to full-time development of the product, it's likely that this number will only increase.
What tools, and/or techniques do you use to maintain this vital (and potentially dangerous) configuration? What safeguards do you have to ensure that an improperly designed rewrite rule doesn't accidentally take out large portions of your site?
[The previous serverfault thread mentions RewriteMap, which seems like an interesting tool, but is not quite suitable for solving our particular problems.]