mod_expires

optize

Well-Known Member
#1
Does mod_expires work with Litespeed?

Customer has the following .htaccess

ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"

Yet, his header for a jpg shows:

Expires: Mon, 08 Dec 2014 14:14:11 GMT

Any ideas?
 

NiteWave

Administrator
#2
tested -- it works.

tested with

ExpiresActive On
ExpiresByType image/png "access 1 year"

default is expires after 1 week. after enable above rule, expire date set to 1 year.

http://httpd.apache.org/docs/2.2/mod/mod_expires.html
Description: Value of the Expires header configured by MIME type
Syntax: ExpiresByType MIME-type <code>seconds
Context: server config, virtual host, directory, .htaccess
Override: Indexes
please note last line:
Override: Indexes

please check if
AllowOverride Indexes
is set

full document:
http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride
 
Top