• Testing Environment: XAMPP local development server. Custom Permalink Structure: Post name: /%postname%/

    This plugin uses the WordPress flush_rewrite_rules(); function. When you activate this plugin it deletes the root htaccess file contents. Usually the WordPress flush_rewrite_rules(); function also adds the standard WordPress Rewrite block of htaccess code which is not being added to the root htaccess file.

    The plugin has these 3 checkboxes below checked by default. When I click the Save Changes button the root htaccess file is still blank and the Browser caching htaccess code that this plugin is supposed to create is not created in the root htaccess file.

    [x] Remove query strings from static content
    [x] Enable GZIP compression (compress text, html, javascript, css, xml and so on)
    [x] Set expire caching (Leverage Browser Caching)

    When I uncheck all of the checkboxes and click the Save Changes button and then recheck all the checkboxes and click the Save Changes button the Browser caching htaccess code that this plugin is supposed to create is created in the root htaccess file – See below.

    Problem: What is missing in the root htaccess file is the standard WordPress Rewrite block of htaccess code. The entire contents of the root htaccess file is shown below.

    # BEGIN WP Performance Score Booster Settings
    
    ## BEGIN Enable GZIP Compression ##
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-httpd-php
    AddOutputFilterByType DEFLATE application/x-httpd-fastphp
    AddOutputFilterByType DEFLATE image/svg+xml
    SetOutputFilter DEFLATE
    </IfModule>
    ## END Enable GZIP Compression ##
    
    ## BEGIN Vary: Accept-Encoding Header ##
    <IfModule mod_headers.c>
    <FilesMatch "\.(js|css|xml|gz)$">
    Header append Vary: Accept-Encoding
    </FilesMatch>
    </IfModule>
    ## END Vary: Accept-Encoding Header ##
    
    ## BEGIN Expires Caching (Leverage Browser Caching) ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 2 week"
    ExpiresByType image/jpeg "access 2 week"
    ExpiresByType image/gif "access 2 week"
    ExpiresByType image/png "access 2 week"
    ExpiresByType text/css "access 2 week"
    ExpiresByType application/pdf "access 2 week"
    ExpiresByType text/x-javascript "access 2 week"
    ExpiresByType application/x-shockwave-flash "access 2 week"
    ExpiresByType image/x-icon "access 2 week"
    ExpiresDefault "access 2 week"
    </IfModule>
    ## END Expires Caching (Leverage Browser Caching) ##
    
    # END WP Performance Score Booster Settings

    https://www.ads-software.com/plugins/wp-performance-score-booster/

Viewing 1 replies (of 1 total)
  • Thread Starter AITpro

    (@aitpro)

    Additional problem: On plugin deactivation the Browser caching code is not removed and the standard WordPress Rewrite block of htaccess code is not created/added again. The flush_rewrite_rules(); function is not firing correctly on plugin deactivation.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress Rewrite block of htaccess code missing from root htaccess file’ is closed to new replies.