Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
424 views
in Q2A Core by
edited by

Hi guys,

I am trying to cache my website with cloudflare. However, I have a problem caching the content. After some research, I figured out that i need to modify the Http response headers that seem to override cloudflare. I tried to use mod_expires in my htaccess file and to update the expiry date to 1 month in the future using the following configuration:

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access 1 month"
ExpiresDefault "access 1 month"
</IfModule>

This should have fixed the issue, but it is not. The expiry date stays 1981. I found this quite strange and quite irritating:

Can this be related to Question2Answer php source code?

The problem i am facing is that, as a result Cloudflare is not able to cache my website. According to their documentation:

"Cache-Control headers sending "private","no-cache", or "max-age=0" or Expires header with a date in the past will override the rule and cause Cloudflare to NOT cache the resource."

Source: CLoudflare

Is there anything i can do to change the expires header value?

Please log in or register to answer this question.

...