[need assist]Wordpress caching rewrite rules

#1
I started working on a WordPress site on my server and a plugin I am using requires the following rules added for caching. My question is: how can I implement the following code properly into my rewrite rules for them to work without all of them throwing errors?
Code:
<IfModule mod_deflate.c>
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
        AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
    <IfModule mod_mime.c>
        # DEFLATE by extension
        AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
</IfModule>
<FilesMatch "\.(bmp|class|doc|docx|eot|exe|ico|json|mdb|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|JSON|MDB|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$">
    <IfModule mod_headers.c>
         Header unset Last-Modified
    </IfModule>
</FilesMatch>
Thank you for your time. I apologize for the noob question, I'm still very used to Apache even though I hate it now that I found OLS. I also understand the syntax should be very similar and placed or configured somewhere else.
 
#2
Hi AEDELGOD,

a couple questions before I can properly answer your question:

1. Which plugin requires those rules? I would like to test internally to see if they are required/will cause any issues otherwise.
2. If you turn on rewrite logging, what errors do you see?

Cheers,
Kevin
 
#3
Hi Kevin,

Putting the code in as is throws errors for all of the actual rules. This is for the W3TC on WordPress. It is for caching. I'm still working out permissions issues with the plugin to function correctly as well so there is no rush. The plugin also has functions to make WordPress websites more PageSpeed friendly such as minimizing HTML, CSS, and JS. This is the main reason why I am using it. The website is technically live but I am still developing it. www.cptutorials.com or www.controlpaneltutorials.com for reference. Right now the only thing I have working is the minimizer but not the caching, so it's always on the fly right now making my server response time 1.1 seconds which is disgusting lol.
 
#4
Have you seen this? It may help.

Also, we also have our own cache plugin for wordpress, with a guide here. We plan on releasing a new version of the plugin this week that will allow you to have both w3tc and our plugin enabled (our plugin for the full page cache, w3tc for minification) if you're interested.

Let me know if the guide didn't help!

Cheers,
Kevin
 
#5
I'll give those a try tomorrow, thanks. There are other plugins I can use for minification so it doesn't need to be w3tc. I just need caching so minification can happen without hindering load times.
 
Top