Support » Plugin: W3 Total Cache » All pages except home give 404 error when minify on

  • Resolved Jon Scaife

    (@jonscaife)


    I’m using W3TC with nginx on a VPS. Whenever I enable minify I get 404 errors on all pages except for the homepage.

    For what it’s worth I can fix this by commenting out 3 lines that W3TC creates in nginx.conf, but I don’t know what the lines do…

    if ($http_accept_encoding ~ gzip) {
    set $w3tc_enc .gzip;
    }

    http://wordpress.org/extend/plugins/w3-total-cache/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Those lines will check, if the browser accepts gzip encoding. If yes, then it’d search for gzipped file to fetch from the cache.

    Jon Scaife

    (@jonscaife)

    well, yes, that’s what they appear to do, but why do they result in 404 errors? I can only assume that for some reason that gziping isn’t happening, altho i have it enabled in my nginx conf

    I just tested minify with the default settings in W3TC version 0.9.2.8 on an Nginx server. You are right. It produces 404 on all pages, except the home page. It is due to a ‘similar’ bug that is already mentioned at http://wordpress.org/support/topic/bug-disk-enhanced-caching-on-nginx-fails-due-to-a-typo-in-the-nginxconf-file?replies=6#post-3837623 . Applying the fix mentioned in that post, fixes the 404 issue you mentioned too. Please take a backup of your existing configuration. I tested it only on a development environment. What works for in a development environment, may not work in a production environment with different plugins, theme, etc.

    Jon Scaife

    (@jonscaife)

    You’re a star. Thank you very much for your help! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘All pages except home give 404 error when minify on’ is closed to new replies.