开发者

.htaccess, expire headers, and the W3 Total Cache plugin for WordPress

开发者 https://www.devze.com 2023-03-10 06:27 出处:网络
I currently have the W3 Total Cache plugin installed on my self-hosted WordPress site. The question is in regards to the behavior im experiencing with the plugin itself and its relation to the .htacce

I currently have the W3 Total Cache plugin installed on my self-hosted WordPress site. The question is in regards to the behavior im experiencing with the plugin itself and its relation to the .htaccess file, which is located one-level up of my WordPress core files. I followed the WordPress Codex on moving the core files in its开发者_StackOverflow中文版 own sub-directory, outside of my root folder.

In any case, the plugin created a bunch of <ifModule> directives, half of which i dont recognize. Im not sure my expire headers are being respected by my CDN -— which it should. I confirmed this using YSlow and WebPageTest, both showed me that none of the files hosted by my CDN have expire headers, despite adding expire headers for all those file types within the plugins settings.

Does it have to do with the location of my .htaccess file and the WordPress core files? Any help is much appreciated.


After talking with customer support over at my CDN's live chat (small chat window, mind you.. but great support), i sort of accepted an inevitable win-lose scenario to this problem. Since all my static files are hosted with them, i used their cache control override feature to set expiry's for me (known as Over-ride Cache Control Header)

Both me and customer support tried several ways to get around W3 Total Cache's settings for caching, none of them worked. It seemed my expiry header directives in my .htaccess file set by the plugin weren't being respected, but all other directives were working fine.

UPDATE: After much research, i found out that my hosting provider doesn't offer mod_expires on shared hosting, it's only available on Virtual Dedicated Server's.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号