• Resolved jroakes

    (@jroakes)


    The Do not process 404 errors for static objects with WordPress Setting in the Browser Cache Settings section (shown here) caused some issues for us and I recommend perhaps putting a label on for others. We use the Custom Permalink plugin By Michael Tyson. We append .html to the end of urls. .html is one of the content types that W3 is considering static content.

    See Code:

    # BEGIN W3TC Skip 404 error handling by WordPress for static files
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_URI} !(robots\.txt|sitemap\.xml(\.gz)?)
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} \.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
        RewriteRule .* - [L]
    </IfModule>
    # END W3TC Skip 404 error handling by WordPress for static files

    Since it is considered static content it is causing WP to tell the webserver to handle the page and the webserver is passing a 404 error in the header even though the page displays in the browser. I tested this on 2 sites (debian and suphp) and had the same issue. We noticed this because Google was throwing not found errors when crawling.

    JR

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Frederick Townes

    (@fredericktownes)

    Thanks for the tip.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    This setting also created some issues with my multisite install with nginx. Basically, the nginx rewrite for /files/whatever.png wasn’t getting processed because this took over and made it 404 out early. After clearing the setting, it didn’t rewrite the nginx.conf file, so I had to manually edit it to clear that bit out. Works fine now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: W3 Total Cache] Do not process 404 errors for static objects with Word’ is closed to new replies.