WordPress.org

Forums

WP Super Cache
WP Super Cache Mod Rewrite rules cannot be updated (10 posts)

  1. truemlmgrowth
    Member
    Posted 3 years ago #

    Trying to get this set up properly, tried many different avenues. Nothing seems to change though. I'm new to editing, so I need specific files and directories on were to find things.

    Mod Rewrite Rules
    Mod Rewrite rules cannot be updated!
    
    You must have BEGIN and END markers in /.htaccess for the auto update to work. They look like this and surround the main WordPress mod_rewrite rules:
    
        # BEGIN WordPress
         RewriteCond %{REQUEST_FILENAME} !-f
         RewriteCond %{REQUEST_FILENAME} !-d
         RewriteRule . /index.php [L]
         # END WordPress
    
    Refresh this page when you have updated your .htaccess file.
    
    WP Super Cache mod rewrite rules were detected in your /.htaccess file.
    Click the following link to see the lines added to that file. If you have upgraded the plugin make sure these rules match.
    
    A difference between the rules in your .htaccess file and the plugin rewrite rules has been found. This could be simple whitespace differences but you should compare the rules in the file with those below as soon as possible. Click the ’Update Mod_Rewrite Rules’ button to update the rules.
    View Mod_Rewrite Rules
    Cannot update .htaccess
    
    The file /.htaccess cannot be modified by the web server. Please correct this using the chmod command or your ftp client.
    
    Refresh this page when the file permissions have been modified.
    
    Alternatively, you can edit your /.htaccess file manually and add the following code (before any WordPress rules):
    
    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
    RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz" [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
    RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html" [L]
    </IfModule>
    # END WPSuperCache

    When I click on the "view_mod rewrite rules" tab, this is displayed below.

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
    RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz" [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
    RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html" [L]
    </IfModule>
    # END WPSuperCache
    
    Rules must be added to /home/lsoppo5/public_html/truemlmgrowth.com/wp-content/cache/.htaccess too:
    
    # BEGIN supercache
    <IfModule mod_mime.c>
      <FilesMatch "\.html\.gz$">
        ForceType text/html
        FileETag None
      </FilesMatch>
      AddEncoding gzip .gz
      AddType text/html .gz
    </IfModule>
    <IfModule mod_deflate.c>
      SetEnvIfNoCase Request_URI \.gz$ no-gzip
    </IfModule>
    <IfModule mod_headers.c>
      Header set Vary "Accept-Encoding, Cookie"
      Header set Cache-Control 'max-age=3, must-revalidate'
    </IfModule>
    <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresByType text/html A3
    </IfModule>
    # END supercache

    I'm trying to add this because my isp recommended it or I may get a possible suspension due to issues...

    I modified .htaccess in the main dir and in the cache dir to 666. I tried to ad the above code in different variations (just the top part, just the bottom part, both). HELP!! :o

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. MickeyRoush
    Member
    Posted 3 years ago #

    # BEGIN supercache
    <IfModule mod_mime.c>
      <FilesMatch "\.html\.gz$">
        ForceType text/html
        FileETag None
      </FilesMatch>
      AddEncoding gzip .gz
      AddType text/html .gz
    </IfModule>
    <IfModule mod_deflate.c>
      SetEnvIfNoCase Request_URI \.gz$ no-gzip
    </IfModule>
    <IfModule mod_headers.c>
      Header set Vary "Accept-Encoding, Cookie"
      Header set Cache-Control 'max-age=3, must-revalidate'
    </IfModule>
    <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresByType text/html A3
    </IfModule>
    # END supercache

    This part goes in your .htaccess which is contained in your wp-content/cache directory. The top part goes into your .htaccess located in your root.

    The top part must be before these WordPress permalink rules:

    # BEGIN WordPress
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    Also, you may need to add the RewriteBase to your WordPress permalink rules. So it would look like this:

    # BEGIN WordPress
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    I'm not sure if you need your RewriteBase set like that as I do not know how your site is setup. This is just a guess.

  3. truemlmgrowth
    Member
    Posted 3 years ago #

    Ok, my main .htaccess file now looks like this.

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
    RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz" [L]
    
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).* [NC]
    RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).* [NC]
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html" [L]
    </IfModule>
    # END WPSuperCache
    
    # BEGIN WordPress
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    and the cache .ht access like this

    # BEGIN supercache
    <IfModule mod_mime.c>
      <FilesMatch "\.html\.gz$">
        ForceType text/html
        FileETag None
      </FilesMatch>
      AddEncoding gzip .gz
      AddType text/html .gz
    </IfModule>
    <IfModule mod_deflate.c>
      SetEnvIfNoCase Request_URI \.gz$ no-gzip
    </IfModule>
    <IfModule mod_headers.c>
      Header set Vary "Accept-Encoding, Cookie"
      Header set Cache-Control 'max-age=3, must-revalidate'
    </IfModule>
    <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresByType text/html A3
    </IfModule>
    
    # END supercache

    I am still getting this message at the top of the WPSC

    Rewrite rules must be updated
    
    The rewrite rules required by this plugin have changed or are missing. Scroll down the Advanced Settings page and click the Update Mod_Rewrite Rules button.

    I have tried it with and without the recommended RewriteBase.
    I am also, still getting the "Mod Rewrite rules cannot be updated!" message. I also uninstalled and reinstalled the super cache to start from scratch, in case these was something I may have messed up, but I did not see anything different.

  4. MickeyRoush
    Member
    Posted 3 years ago #

    At this point it shouldn't matter if WP Super Cache says that they cannot be updated, as you have done it yourself manually and they are set. (The message that WP Super Cache is giving could be for many reasons. I get the message as well, because I customize by .htaccess files to my needs.)

    Now you need to test and see if WP Super Cache is working. In order for WP Super Cache to use the Rewrite rules you have in place it needs to be set to "Use mod-rewrite to serve cache files. (Recommended)" under the Advanced tab in WP Super Cache Settings.

    To test if it's working, select the Easy tab, then select "Test Cache". If it's functioning you should get a reply like the following:

    Fetching http://yourdomain.com/ to prime cache: OK
    
    Fetching first copy of http://yourdomain.com/: OK (1.html)
    
    Fetching second copy of http://yourdomain.com/: OK (2.html)
    
    Page 1: 2011-08-29 13:42:32
    
    Page 2: 2011-08-29 13:42:32
    
    The timestamps on both pages match!
  5. truemlmgrowth
    Member
    Posted 3 years ago #

    Cache Tester
    
    Test your cached website by clicking the test button below.
    
    Fetching http://truemlmgrowth.com/blog/ to prime cache: OK
    
    Fetching first copy of http://truemlmgrowth.com/blog/: OK (1.html)
    
    Fetching second copy of http://truemlmgrowth.com/blog/: OK (2.html)
    
    The pages do not match! Timestamps differ or were not found!

    Does it matter if they do not match?

  6. MickeyRoush
    Member
    Posted 3 years ago #

    Does it matter if they do not match?

    Yes, they need to match. It means that WP Super Cache is not working correctly or completely.

    What are your file permissions for the wp-content/cache directory?

    Also what is your WordPress Permalink structure set to?
    Settings > Permalinks > Common Settings

  7. truemlmgrowth
    Member
    Posted 3 years ago #

    The permissions for wp-content/cache directory are:

    Mode 	User	Group 	World
    Read 	x	x	x
    Write 	x
    Execute x	x	x
    Permission 7-5-5

    The permalink settings are set for custom - /%postname%/

    It says that it can't write to the .htaccess file (which is set at 6-6-6) and I should add this manually:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>

    but when I do, it gives me this message for the cache test:

    Cache Tester
    
    Test your cached website by clicking the test button below.
    
    Fetching http://truemlmgrowth.com/blog/ to prime cache: OK
    
    Fetching first copy of http://truemlmgrowth.com/blog/: OK (1.html)
    
    Fetching second copy of http://truemlmgrowth.com/blog/: OK (2.html)
    
    One or more page requests failed:
    
        Page 1: 500 (Internal Server Error)
        Page 2: 500 (Internal Server Error)
    
    The pages do not match! Timestamps differ or were not found!

    If I set the permalink to "default", then I get this error message.

    Permlink Structure Error
    
    A custom url or permalink structure is required for this plugin to work correctly. Please go to the Permalinks Options Page to configure your permalinks.

    and it won't let me do anything until I change it back to custom.

    So I set the .htaccess back to your recommendations (I tried changing the /blog/ line to /%postname%/ but it didn't help) and it shows the original message that timestamps don't match. I feel like I keep going in circles, but there is probably something simple I am missing.

  8. MickeyRoush
    Member
    Posted 3 years ago #

    Your file permissions for wp-content/cache is okay. Your custom permalink set to /%postname%/ is fine.

    I'm not sure if your RewriteBase should be set to blog or root:

    RewriteBase /blog/

    or

    RewriteBase /

    That may be an issue. What happens when you set it to just:
    RewriteBase /

    Getting to get the mod_rewrite settings to work correctly can take some work, trust me, it took me a couple of weeks till I finally figured out the best settings for my set up.

    There needs to be some consistency if the RewriteBase is going to be
    RewriteBase /blog/

    That means these need to be adjusted as well:
    RewriteRule ^(.*) "/blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz" [L]

    RewriteRule ^(.*) "/blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html" [L]

    And the WordPress Permalink .htaccess rules need to be set like it's suggesting like:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>

    I would try it with all instances of blog/ and without it.

    This may be causing an issue as well:
    RewriteCond %{DOCUMENT_ROOT}

    It may need the direct path that is set up on your server instead of {DOCUMENT_ROOT}. Who do you have hosting your site? For some hosts you have to put the direct path instead of {DOCUMENT_ROOT}.

    Try experimenting with adjusting the RewriteBase rules first.

    What happens when you try "Use PHP to serve cache files"? Under Advanced.

  9. truemlmgrowth
    Member
    Posted 3 years ago #

    I'll try that, if I can get my site back up.... ugh! I was messing around with this all day, looking up different options and finally decided I would try the quickcache plugin. I tested it, and it didn't work either. I wanted to get a fresh install of super cache again and in my haste, I started to delete the cashe files and folders, hit a certain point (or folder) and everything quit working... Awww crap!! That's what happens when you get tired of doing this for over a week. I was also under pressure from my isp (inmotion hosting) as they had suspended my account for a bit this morning due to overuse out the bandwidth this morning trying to figure this out.

    So, for the moment, my site is completely down, without a backup that seems to be any good. I could be down for quite some time with this...

  10. MickeyRoush
    Member
    Posted 3 years ago #

    I know how you feel. Getting mod_rewrite to work with any cache plugin can take some work. .htaccess Rules may need to be adjusted depending on how your server is configured. I guess that's why a lot of people use QuickCache or HyperCache. I've used all three. WP Super Cache seem to give me the best benchmarking results.

    I'm wondering if your host knows the optimal settings for WP Super Cache if they are suggesting you use it? If you get it back up, try using WP Super Cache with it using PHP to serve cache files. It doesn't require the .htaccess rules to work.

    Advanced > Use PHP to serve cache files

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