How to allow a CDN to cache images in an internal data folder with .htaccess ?

Developing and fixes
zeus71
User w
User w
Posts: 6
Joined: Sat Apr 18, 2020 10:30 pm

How to allow a CDN to cache images in an internal data folder with .htaccess ?

Post by zeus71 »

Hello,

I have a problem with a CDN, becouse my forum platform use to store full images in a internal_data folder an set a cache-control to "no-cache".
Other folder where thumbnails and users avatars are stored, work great, all is cached by my CDN provider.

I have read that using .htaccess is possible to change it, but It doesn't works.
Example :

<FilesMatch "\.(js|jpg|jpeg|png|gif|swf|svg)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>


Is it needed also to make the internal-folder , public, in his .htaccess, to allow it ?

Sorry if is OT for this forum.

User avatar
axew3
w3all User
w3all User
Posts: 2006
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: How to allow a CDN to cache images in an internal data folder with .htaccess ?

Post by axew3 »

do not know personally too much about, but you mean this?
https://stackoverflow.com/questions/410 ... n-htaccess
where Browser Caching using Mod_Expires, or others examples if you not already read the thread

Post Reply