From: Rich Bowen Date: Tue, 2 Jun 2026 12:56:53 +0000 (+0000) Subject: Fix RedirectMatch regex in ACME exemption recipe (bug 70084) X-Git-Tag: 2.4.68-rc1-candidate~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=023b3170d8a7e0340f1f39fbc80f5cebd70a25c0;p=thirdparty%2Fapache%2Fhttpd.git Fix RedirectMatch regex in ACME exemption recipe (bug 70084) 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. Same as trunk r1934878. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1934879 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/remapping.xml b/docs/manual/rewrite/remapping.xml index 5d54b142a4..d528ff2226 100644 --- a/docs/manual/rewrite/remapping.xml +++ b/docs/manual/rewrite/remapping.xml @@ -221,7 +221,7 @@ RewriteRule "^(.*)" "https://%{SERVER_NAME}$1" [R=301,L] </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>