We Recommend

Pro Apache Pro Apache
In addition to installation, maintenance, and deployment, the book demonstrates how to configure Apache to use Perl, PHP, and Python as server-side scripting languages. And unlike other books on Apache, Pro Apache provides comprehensive information on both major revisions - 1.3 and 2.0 - of the software.


Ballyhoo


Posted By

CharlyBr on 03/25/08


Tagged

header apache expires


Versions (?)


Add expires header with Apache


Published in: Apache 


ExpiresActive tells the apache2 to use the expires module.

ExpiresDefault specifies the expire date for all mime-types in this directory.

ExpiresByType specifies the expires date for the specified mime-type in this directory.


  1. <IfModule mod_expires.c>
  2. ExpiresActive on
  3. ExpiresByType image/gif “access plus 2 years”
  4. ExpiresDefault ”access plus 1 days”
  5. </IfModule>

Report this snippet 

You need to login to post a comment.