WP Super Cache
Cannot update .htaccess (2 posts)

  1. soleil_levant
    Posted 4 years ago #

    I resurface an old post by me without reply.

    The original post is here

    I copy/paste the end :

    Ever the same warning, today with WP 3.0.1 and WP SuperCache

    Maybe there is a mistake in the code of wp-cache.php ?

    After the plugin is installed and works, when I display the advanced page in WPSC settings, I see ever the same warning : "Cannot update .htaccess".

    (With .htaccess in 666, no warning. With .htaccess in 644, warning)

    In wp-cache.php, the code is (line 1058) :

    <a href="javascript:toggleLayer('rewriterules');" class="button">
    <?php _e( 'View Mod_Rewrite Rules', 'wp-super-cache' ); ?></a>
    <?php wpsc_update_htaccess_form(); ?>
    <div id='rewriterules' style='display: none;'>

    So, in any case (before or after update of .htaccess), there is a call to the function wpsc_update_htaccess_form().

    In the body of this function (line 2290), there is in the beginning :

    if( !is_writeable_ACLSafe( $home_path . ".htaccess" ) )...

    And is_writeable_ACLSafe(/.../.htaccess) return ever false if I chmod
    .htaccess to 644. But, for safety reasons, this file cannot stay in 666 (it's the .htacces on the root).

    To fix this issue, I replace (line 72 in wp-cache.php, after the plugin is updated and working) :

    if ($f===false)
         return false;


    if ($f===false)
         return true;

    But maybe it's not a definitive solution.


  2. Donncha O Caoimh
    Plugin Author

    Posted 4 years ago #

    No, it's not a solution, sorry. Can you debug the code that displays the warning? Find out why it thinks the rewrite rules weren't written.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Super Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic