add helper for debugging rewrite rules