Give rules a default name.
Extract method to find matching rule for both redirects and rewrites.