Closed finnianr closed 3 years ago
@finnianr this is because the match is how you arrive at the handler, and the handler that does the operation are not integrated. The matches only purpose is to get you there, but may also be more generic, you could a directory match with a redirection for example. In addition the handler may have more replacements making it not a 1:1 relationship.
I am looking at the official documentation for redirection. In this particular example is shows that you first create a reg expression rule, then assign an internal redirect handler for that rule. But in the handler the exact same regular expression is specified again. This is counter to the DRY principle. Why the need for this repetition?