Quantcast
Channel: WordPress.org Forums » [W3 Total Cache] Support
Viewing all articles
Browse latest Browse all 19286

JohnQQQ on "W3 Total Cache - RSS feeds - text/html vs. text/xml - solution"

$
0
0

Hi everyone - not a question but rather a solution for something we ran across recently. When you turn on Page Cache, your RSS feeds will be served as text/xml the first time they are returned to a client but text/html thereafter (since it's serving the RSS feed as a "page" and the config rules from W3TC explicitly do "AddType text/html" to everything coming out of the page cache (at least in "disk enhanced" mode).

In the interim before there is an official solution, it can be handled with something like this in your apache config:

<FilesMatch "^/<your path>/(.*)/feed/$">
   ForceType text/xml
</FilesMatch>

Note that the regex may not match your particular path so that will probably need adjustment.

https://wordpress.org/plugins/w3-total-cache/


Viewing all articles
Browse latest Browse all 19286

Trending Articles