]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_expires: document wildcard sub-type matching in ExpiresByType (Bug 69257)
authorRich Bowen <rbowen@apache.org>
Sat, 2 May 2026 22:26:58 +0000 (22:26 +0000)
committerRich Bowen <rbowen@apache.org>
Sat, 2 May 2026 22:26:58 +0000 (22:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933749 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_expires.xml

index 2f356ae8904a61c9cdbf79fbed398740ed53f7ac..4fe207afb67d7e1403ec128ec099926ba1d5e818 100644 (file)
@@ -208,6 +208,23 @@ ExpiresByType text/html M604800
     <p>You can also specify the expiration time calculation using
     an <a href="#AltSyn">alternate syntax</a>, described earlier in
     this document.</p>
+
+    <p>The MIME type can use a wildcard for the sub-type, for
+    example <code>image/*</code>. This will match any type under
+    that major type. When a request's content type does not match
+    a specific <directive>ExpiresByType</directive> entry, a
+    wildcard entry for the major type is checked before falling
+    back to the <directive module="mod_expires">ExpiresDefault</directive>.</p>
+
+    <example><title>Example with wildcard:</title>
+    <highlight language="config">
+ExpiresActive On
+# All images expire after 1 month
+ExpiresByType image/* "access plus 1 month"
+# Override specifically for GIF
+ExpiresByType image/gif "access plus 1 week"
+    </highlight>
+    </example>
 </usage>
 </directivesynopsis>