• leanca

    (@leanca)


    I have W3TC symlinked from another folder, but minification doesn’t work. This checkbox (Fix Document Root Path) doesn’t help https://www.boldgrid.com/support/w3-total-cache/general-settings-miscellaneous/.

    <strong>W3 Total Cache error:</strong>It appears Minify <acronym title="Uniform Resource Locator">URL</acronym> rewriting is not working. Please verify that the server configuration allows .htaccess<br />Unfortunately minification will not function without custom rewrite rules. Please ask your server administrator for assistance. Also refer to <a href="https://example.com/wp-admin/admin.php?page=w3tc_install">the install page</a> for the rules for your server.
    Technical info

    .htaccess file contains rules to rewrite url https://example.com/wp-content/cache/minify/373343266w3tc_rewrite_test.css. If handled by plugin, it returns "Minify OK" message.<br/>The plugin made a request to https://example.com/wp-content/cache/minify/373343266w3tc_rewrite_test.css but received: <br /><pre>Array ( [code] => 404 [message] => Not Found ) </pre><br />instead of "Minify OK" response. <br />
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @leanca

    Thank you for reaching out and I am happy to help!

    Can you pelase let me know if the minify rewrite rules are added to your .htaccess file and in the .htaccess in the cache/minify/ folder?
    Also, pelase check the install tab and make sure that the Rewrite URL structure option is enabled in the Performance>Minify settings

    Thanks!

    Thread Starter leanca

    (@leanca)

    It looks like the problem isn’t with the Symlink, I tried without it.

    – the minify rewrite rules are added in .htaccess
    – the Rewrite URL structure option is enabled

    1. I turn on Minify mode: Manual and get 404 for js and css.
    2. I uncheck the box “Do not process 404 errors for static objects with WordPress”

    Now I get  NS_ERROR_INVALID_CONTENT_ENCODING for css.
    js is working

    3.  I uncheck “Enable HTTP (gzip) compression”
    Now all js and css are 200, but there are also images and fonts cached, for example
    404 /wp-content/cache/minify/images/left-arrow.png
    404 /wp-content/cache/fonts/icomoon.ttf

    The usual path for these is:
    /wp-content/themes/themename/images/slide-controller.png
    /wp-content/themes/themename/fonts/icomoon.ttf

    Now I don’t know what else to turn on. Maybe it’s somehow related to the fact that the sites are on Cloudflare?

    Thread Starter leanca

    (@leanca)

    I installed WP-Optimize and it added to the .htaccess the following code, which helped solve the problem

    # BEGIN WP-Optimize Gzip compression Compress HTML, CSS, JavaScript, Text, XML and fonts

    AddType application/vnd.ms-fontobject .eot
    AddType font/ttf .ttf
    AddType font/otf .otf
    AddType font/x-woff .woff
    AddType image/svg+xml .svg

    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
    AddOutputFilterByType DEFLATE application/x-font
    AddOutputFilterByType DEFLATE application/x-font-opentype
    AddOutputFilterByType DEFLATE application/x-font-otf
    AddOutputFilterByType DEFLATE application/x-font-truetype
    AddOutputFilterByType DEFLATE application/x-font-ttf
    AddOutputFilterByType DEFLATE application/x-font-woff
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE font/opentype
    AddOutputFilterByType DEFLATE font/otf
    AddOutputFilterByType DEFLATE font/ttf
    AddOutputFilterByType DEFLATE font/woff
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE image/x-icon
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/xml

    # Remove browser bugs (only needed for really old browsers)

    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    <IfModule mod_headers.c>
    Header append Vary User-Agent
    </IfModule>
    </IfModule>

    # END WP-Optimize Gzip compression
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @leanca

    Thank you for reaching out and I am happy to help!

    Can you please let me know if the Gzip compression was enabled for JS&CSS in the advanced settings for Browser Cache or in the general tab?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.