WordPress.org

Ready to get started?Download WordPress

Forums

Yoast Sitemap returns 404 in header (1 post)

  1. Shivanand The Designer
    Member
    Posted 1 year ago #

    Just checked the Yoast SEO plugin and it was returning a 404 status code in the sitemap xml file (even though the sitemap was fine). W3C Total Cache came out to be the culprit. Removing the following lines from .htaccess fixed it.

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

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by Shivanand The Designer
  • This topic is not resolved
  • WordPress version: 3.4.2