WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[closed] Incorrectly writing to htaccess (4 posts)

  1. beaucharman
    Member
    Posted 12 months ago #

    Hey guys

    We recently attempted to update the W3 Total Cache plugin on one of our sites; it failed to update, and since then we are having issues with the site's htaccess file. We have completely uninstalled the plugin, and removed any and all config files or cache folders related to the plugin, and have freshly reinstalled it (0.9.2.11).

    Yet, we are still having htaccess issues (giving users a 500 error).

    It seems that periodically the plugin is writing to the htaccess file, but not completing it's task, timing out maybe? Here is the htaccess file from the last 500 error.

    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
        <IfModule mod_headers.c>
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Notice that the IfModule mod_deflate.c and mod_headers blocks are not being closed, and that the WordPress permalink rewrite block is being repeated 2 times.

    If anyone is having this issue, and can point me in the right direction of a fix, that would be awesome.

    <3

    Beau

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

  2. beaucharman
    Member
    Posted 12 months ago #

    Here is another example of what W3 Total Cache is outputting:

    # BEGIN W3TC CDN
    <FilesMatch "\.(ttf|otf|eot|woff)$">
      <IfModule mod_headers.c>
    
    # BEGIN W3TC CDN
    <FilesMatch "\.(ttf|otf|eot|woff)$">
      <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
      </IfModule>
    </FilesMatch>
    # END W3TC CDN

    Duplicating the opening tags for FilesMatch and IfModule, but not closing them.

  3. tomhodgson
    Member
    Posted 1 month ago #

    I am also getting the exact same symptoms. Not sure if it is related but this is after reverting a site back from multisite to a single site installation (and yes it has been done correctly)

  4. esmi
    Forum Moderator
    Posted 1 month ago #

    If you require assistance then, as per the Forum Welcome, please post your own topic instead of tagging onto someone else's topic.

    I am now closing this 10 month old topic as it references an older version of WordPress.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic