rewrite rule debugging tool

And fix some issues it showed