• Resolved justauser034675

    (@woocomuser)


    In all of our websites we have code to force SSL/https within the WordPress tags. It is outside of the Litespeed plugin cache code but your plugin still constantly reverts our code to standard wordpress code.

    Here is what our modified file looks like (before your plugin strips out our modified code):
    ——————————————————————-
    # BEGIN LSCACHE
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* – [E=Cache-Control:no-autoflush]
    RewriteRule ^min/\w+\.(css|js) – [E=cache-control:no-vary]

    ### marker CACHE RESOURCE start ###
    RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php – [E=cache-control:max-age=3600]
    ### marker CACHE RESOURCE end ###

    ### marker FAVICON start ###
    RewriteRule favicon\.ico$ – [E=cache-control:max-age=86400]
    ### marker FAVICON end ###

    </IfModule>
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    # END LSCACHE
    # BEGIN NON_LSCACHE
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    ### marker MINIFY start ###
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} ^(.*)/min/(\w+)\.(css|js)$
    RewriteCond %1/wp-content/cache/$2/$1.$2 -f
    RewriteRule min/(\w+)\.(css|js) wp-content/cache/$2/$1.$2 [L]
    </IfModule>
    ### marker MINIFY end ###

    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    # END NON_LSCACHE

    # BEGIN WordPress

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://somedomain.com/$1 [R,L]
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    —————————————————————-

    Here is what happens on random occasions when your plugin is updated and/or settings are changed or turned on/off (notice the reverted wordpress tag code)

    —————————————————————–
    # BEGIN LSCACHE
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* – [E=Cache-Control:no-autoflush]
    RewriteRule ^min/\w+\.(css|js) – [E=cache-control:no-vary]

    ### marker CACHE RESOURCE start ###
    RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php – [E=cache-control:max-age=3600]
    ### marker CACHE RESOURCE end ###

    ### marker FAVICON start ###
    RewriteRule favicon\.ico$ – [E=cache-control:max-age=86400]
    ### marker FAVICON end ###

    </IfModule>
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    # END LSCACHE
    # BEGIN NON_LSCACHE
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    ### marker MINIFY start ###
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} ^(.*)/min/(\w+)\.(css|js)$
    RewriteCond %1/wp-content/cache/$2/$1.$2 -f
    RewriteRule min/(\w+)\.(css|js) wp-content/cache/$2/$1.$2 [L]
    </IfModule>
    ### marker MINIFY end ###

    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    # END NON_LSCACHE

    # 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
    ————————————————————

    Please help as sometimes this will cause our websites to go down or not display at all – it is causing collateral damage across all websites on our server.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Do you have any detail steps for how to trigger/reproduce it ?

    I tried many times enabling/disabling options that will write htaccess, and also as activate and de-activate the LSCWP , but never trigger such issue.

    the only I know of , that will result in such case , is you modify the permanlink will make WP rewrite the rule , but that happens regardless with or without LSCWP.

    Best regards,

    Plugin Support LiteSpeed Lisa

    (@lclarke)

    Hi,

    Do you still need help with this? If so, please help us to reproduce the issue.

    I’m going to mark this topic “Resolved” for now, but will re-open it if we hear from you again.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Constantly overwrites custom code in htaccess in all websites’ is closed to new replies.