XF : .HTACCESS to set public cache for Internal-data and use CDN ?

zeus1971

Well-known member
Registered
Joined
Apr 18, 2020
Messages
152
Points
43

Reputation:

As you know XENFORO internal data, where overall there are full images attachments, are not cacheable by CDN.
Recently I read a couple of threeds where it seems that using .htaccess we can override the default set "no-cache" for this path/images, and in theory make them cacheable.
I try it, but, I'm not an expert in Apache / PHP and may be , there were syntax errors, and it didn't work..

Do you have experience or solution with that ?

here the threed :

https://xenforo.com/community/threads/possible-to-add-a-cache-setting-for-images-that-are-xf-attachments.156126/

https://www.keycdn.com/support/http-caching-headers
 

popwoo

SVIP Member
S.V.I.P Member
Registered
Joined
Jul 28, 2020
Messages
99
Points
33

Reputation:

sorry to go off topic but does what ur trying to do does this apply to only attachments or all images?
 

zeus1971

Well-known member
Registered
Joined
Apr 18, 2020
Messages
152
Points
43

Reputation:

The point is that standard CDN can cache only in the external data path in xenforo, where basucally we obtain only thumnails and avatars cache. I (and many users...) want to cache with CDN, also the full image attachment, that is stored in a separate path (internal data) where are not cacheable due to permission set on PHP by xenforo.
 

popwoo

SVIP Member
S.V.I.P Member
Registered
Joined
Jul 28, 2020
Messages
99
Points
33

Reputation:

oh gotcha. i completely disabled attachments on my board so won’t think it’s useful for me but hope someone here can help u out bro
 

zeus1971

Well-known member
Registered
Joined
Apr 18, 2020
Messages
152
Points
43

Reputation:

Ok tired to investigate or trying solutions. Also BUnnyCDN has no solutions. (they say to try with S3 AWS , and for me it's not a solution having already a CDN provider !)
Waiting for an "oficial" solution from XF, maybe in the future with an option to store attachments in external folder (public).
 
Top