redirectmatch negative lookahead regex

I came across the folllowing redirect match for Apache on the following site:


RedirectMatch 301 ^(?!/\.well-known/acme-challenge/).*$0

If I'm not mistaken, this is a negative lookahead regex, right? The question is, why would someone need something so complex in this case?
Or wouldn't it work otherwise with a RedirectMatch?
Presumably because a negative explicit case is easier to come up with than a positive general case that just happens to exclude the specific negative case.

Registered users can post here. Sign in or register to post.