The negative lookahead (?!...) is zero-width and non-capturing, so
the original pattern matched only the leading slash and \$1 was
undefined. Add a capturing group (.*)$ after the lookahead so that
\$1 contains the remainder of the URL-path.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1934878 13f79535-47bb-0310-9956-
ffa450edef68
</Directory>
# Everything else goes to HTTPS
- RedirectMatch permanent "^/(?!\.well-known/acme-challenge/)" "https://www.example.com/$1"
+ RedirectMatch permanent "^/(?!\.well-known/acme-challenge/)(.*)$" "https://www.example.com/$1"
</VirtualHost>
</highlight>