You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/11/19 12:38:57 UTC

DO NOT REPLY [Bug 46241] New: mod_expires - ExpiresByPattern or ExpiresIf

https://issues.apache.org/bugzilla/show_bug.cgi?id=46241

           Summary: mod_expires - ExpiresByPattern or ExpiresIf
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_expires
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: apache@aquabolt.com


Hello, 

an enhancement request for mod_expires would be much apprciated;

Suggestion 1: ExpiresByPattern 

ExpiresByPattern \.(png|gif|jpg) A2592000
ExpiresByPattern ticker\.gif     A-1

Where the last match wins/overwrites, so I can put general expires in main
config and then allow virtuals to specialise more specific patterns as they
wish

The ExpiresByType is just too big a brush for complex things.

Suggestion 2: ExpiresIf 
Alternately, you might consider something like:

SetEnvIf Request_URI "\.jpg$"       expiry=month
SetEnvIf Request_URI "\.gif$"       expiry=year
SetEnvIf Request_URI "ticker\.gif$" !expiry

ExpiresIf %{ENV:expiry}=month A2592000
ExpiresIf %{ENV:expiry}=year "access plus 1 year"

etc.

Many thanks!
Jeff


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46241] mod_expires - ExpiresByPattern or ExpiresIf

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46241





--- Comment #1 from Ruediger Pluem <rp...@apache.org>  2008-11-19 09:42:21 PST ---
IMHO you should be able to do this for local files already:

 <FilesMatch "\.(png|gif|jpg)">
ExpiresDefault  A2592000
</FilesMatch>


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46241] mod_expires - ExpiresByPattern or ExpiresIf

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46241





--- Comment #2 from Jeff Armstrong <ap...@aquabolt.com>  2008-11-19 10:19:16 PST ---
You are correct - and the LAST <FilesMatch> directive wins

  <FilesMatch "\.(png|gif|jpg)$">
    ExpiresDefault  "access plus 2 months"
  </FilesMatch>

  <FilesMatch "ticker\.gif$">
    ExpiresDefault  A0
  </FilesMatch>

works as expected.

Many thanks, perhaps this enhancement request should be downgraded to 'update
the docs with an example'.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org