Hello @ashique12009
Thank you for reaching out and I am happy to assist you with this.
Can you please share the screenshot of the Performance>Browser Cache section, and also share your .htaccess file to see if the settings enabled in the Browser Cache section are reflecting the rules in your .htaccess?
Please share the entire .htaccess so I can check for any custom rules.
Also, make sure that you don’t have any custom expires and cache-control rules in the upper level of the website folder structure, as they will override the rules in the website folder.
Thanks!
Hello @ashique12009
Thank you for your feedback. The first thing I’ve noticed is that you have duplicate rules. The rules at the top of your .htaccess file are identical to the # BEGIN WordPress rules at the bottom of the .htaccess so you should remove those rules from the top(make a backup first):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^v4checkout/?$ /easyCheckout.php?v4checkout [QSA,L]
RewriteRule ^sslcommerzipn/?$ /easyCheckout.php?sslcommerzipn [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Once removed, re-save the settings, purge the W3 Total Cache cache, and check if the headers are present.
the W3TC rules are there so it’s not a problem with the rules added by the W3TC
If this does not solve the problem please check the upper level of your server folder structure for any other .htaccess files or httpd.conf file for any rules that may prevent W3TC from adding the expires and cache control header.
Thanks!