]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
bz64372 Fixes mod_brotli compressed file example syntax.
authorRich Bowen <rbowen@apache.org>
Wed, 18 Mar 2026 16:27:43 +0000 (16:27 +0000)
committerRich Bowen <rbowen@apache.org>
Wed, 18 Mar 2026 16:27:43 +0000 (16:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1932367 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_brotli.html.en.utf8
docs/manual/mod/mod_brotli.xml

index ed8b3d47bec717c3093b40ed23ec6a31ecd874bf..957baa22374c11d45da97d498ab8965da501265d 100644 (file)
@@ -159,14 +159,14 @@ content</a> <a title="Permanent link" href="#precompressed" class="permalink">&p
     <pre class="prettyprint lang-config">&lt;IfModule mod_headers.c&gt;
     # Serve brotli compressed CSS and JS files if they exist
     # and the client accepts brotli.
+    RewriteEngine On
     RewriteCond "%{HTTP:Accept-encoding}" "br"
-    RewriteCond "%{REQUEST_FILENAME}\.br" "-s"
-    RewriteRule "^(.*)\.(js|css)"              "$1\.$2\.br" [QSA]
+    RewriteCond "%{LA-U:REQUEST_FILENAME}.br" "-s"
+    RewriteRule "^(.*)\.(js|css)"              "$1.$2.br" [QSA]
 
     # Serve correct content types, and prevent double compression.
-    RewriteRule "\.css\.br$" "-" [T=text/css,E=no-brotli:1]
-    RewriteRule "\.js\.br$"  "-" [T=text/javascript,E=no-brotli:1]
-
+    RewriteRule "\.css\.br$" "-" [T=text/css,E=no-brotli:1,E=no-gzip:1]
+    RewriteRule "\.js\.br$"  "-" [T=text/javascript,E=no-brotli:1,E=no-gzip:1]
 
     &lt;FilesMatch "(\.js\.br|\.css\.br)$"&gt;
       # Serve correct encoding type.
index bb6e28f5bc74228370fabf7aff6e6b046c160d16..014d0d19edd3f0da821ea3f181d77749107442f2 100644 (file)
@@ -144,14 +144,14 @@ content</title>
 &lt;IfModule mod_headers.c&gt;
     # Serve brotli compressed CSS and JS files if they exist
     # and the client accepts brotli.
+    RewriteEngine On
     RewriteCond "%{HTTP:Accept-encoding}" "br"
-    RewriteCond "%{REQUEST_FILENAME}\.br" "-s"
-    RewriteRule "^(.*)\.(js|css)"              "$1\.$2\.br" [QSA]
+    RewriteCond "%{LA-U:REQUEST_FILENAME}.br" "-s"
+    RewriteRule "^(.*)\.(js|css)"              "$1.$2.br" [QSA]
 
     # Serve correct content types, and prevent double compression.
-    RewriteRule "\.css\.br$" "-" [T=text/css,E=no-brotli:1]
-    RewriteRule "\.js\.br$"  "-" [T=text/javascript,E=no-brotli:1]
-
+    RewriteRule "\.css\.br$" "-" [T=text/css,E=no-brotli:1,E=no-gzip:1]
+    RewriteRule "\.js\.br$"  "-" [T=text/javascript,E=no-brotli:1,E=no-gzip:1]
 
     &lt;FilesMatch "(\.js\.br|\.css\.br)$"&gt;
       # Serve correct encoding type.