Support the ongoing development of Laravel.io →
Configuration Cache

Hi! I am using Laravel 5.2 and Apache 2.4. I have created an .htaccess file in the /public/images directory (where I store images) with the following contents:

Header unset ETag
FileETag None

ExpiresActive On
ExpiresDefault "access plus 2 days"

ExpiresByType image/gif "access plus 2 days" 

ExpiresByType image/png "access plus 2 days" 

ExpiresByType image/jpg "access plus 2 days" 

in order to disable ETag and enable image caching through the "Expires" header, but it seems that no such header is generated. I have checked this .htaccess to another dummy site and it works! So, I suppose it is not a fault of the htaccess file itself.

Any ideas?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

agougousis agougousis Joined 20 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.