• mkamel9089

    (@mkamel9089)


    Hello WP Super Cache Team,

    I hope you’re doing well.

    I wanted to report an issue regarding the .htaccess rules generated by the plugin. I manually update and maintain the required rewrite rules inside my .htaccess file, and everything is configured correctly. However, after updating the plugin or refreshing the settings, the warning about incorrect or missing .htaccess rules keeps appearing, even though the code is already added and working.

    Below is the exact code I currently have in my .htaccess file:

    BEGIN WP Super Cache


    RewriteEngine On
    RewriteBase /

    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]

    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} !on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz" [L]

    RewriteCond %{HTTPS} on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html" [L]

    RewriteCond %{HTTPS} !on
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]


    AddEncoding gzip .gz
    AddType text/html .gz END WP Super Cache

    Despite having the correct block in place, the plugin continues to show the warning.
    Could you please check why the plugin is not detecting the existing rules, or let me know if the detection process has changed?

    Thank you for your help and for maintaining such a great plugin.

    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Stef (a11n)

    (@erania-pinnera)

    Hi there, @mkamel9089,

    Thanks so much for sharing the details, and for maintaining your rules manually.

    WP Super Cache uses a very strict detection method for the .htaccess block. It does a literal comparison against the exact rule template it expects. This means that even small differences, extra spacing, additional rules inside the block, different quoting, reordering, or merged HTTPS/HTTP rule, will cause the plugin to think the block is missing, even if everything is working correctly.

    The rules you’ve added are valid, but they don’t match the plugin’s expected pattern character-for-character, so WP Super Cache continues to show the warning. I notice that the end of the code # END WP Super Cache should be on its own line, while it is now on the same line of the end of the code. It that might be that causing the issue.

    All in all, you can safely ignore the notice as long as your cache is working and the pages are being served from the Super Cache directory.

    If you’d like the warning to disappear, in case moving the # END WP Super Cache on its own line won’t help, the only way is to copy/paste the exact block shown in Settings → WP Super Cache → Advanced → Update Mod_Rewrite Rules, without any changes.

    Hope that helps! Let me know how you get on.

    Thread Starter mkamel9089

    (@mkamel9089)

    Hello @erania-pinnera

    I copied and pasted the exact rule block from Settings → WP Super Cache → Advanced → Update Mod_Rewrite Rules without any modifications at all, and I made sure that # END WP Super Cache is on its own separate line exactly as required.

    However, the warning still does not disappear.

    Additionally, Preload is still not working, even after multiple attempts. It keeps stopping and restarting, and it never completes the preload process.

    Please let me know what further steps I can take to resolve these issues.

    Thank You

    Plugin Support Stef (a11n)

    (@erania-pinnera)

    Hi @mkamel9089,

    Thanks for sharing your setup! From what you’ve described, it looks like some of the required caching rules are still missing from your .htaccess file. WP Super Cache includes additional checks, such as cookie checks, header checks, and protections against POST requests, that need to be present for everything to work correctly.

    Because of that, the easiest and most reliable approach is to let the plugin manage the full block of rules automatically. That ensures the configuration stays consistent with what WP Super Cache expects.

    If you’d prefer not to handle the advanced rules manually, you can switch to Simple cache mode – it’s much easier to maintain and, for most sites, just as fast.

    Regarding the preload not running, try enabling debug mode and checking the debug log. It will usually give you clear information about why the preload isn’t completing.

    Hope that helps!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.