Reputation: 362
How do I specify browser caching for images, css, js, etc but ONLY for certain domains? We have our own basic CDN and would like images from subdomains cached separately from images on the primary domian.
Upvotes: 0
Views: 710
Reputation: 13812
You should just be able to add this to an .htaccess in the root of the desired domain/subdomain
<FilesMatch ".(js|css|gif|jpg|jpeg|png|ico)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
Upvotes: 2