I am trying to set the expire header for a specific URI, but for some reason it does not work, what I have done so far in the httpd.conf file was this:
<LocationMatch "/mysite/contentservices/weather/get.json">
ExpiresDefault A86400
</LocationMatch>
<LocationMatch "/mysite/*">
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
ExpiresByType text/css "access plus 1 day"
ExpiresByType text/javascript "access plus 1 day"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType application/x-shockwave-flash "access plus 1 week"
</LocationMatch>
It just doesn't work for me. I have no expiration date headers for the content that I specified. I also donβt understand what exactly happens when you have two directives LocationMatchthat overlap the first priority?
source
share