Support » Plugin: LiteSpeed Cache » missing htaccess data

  • Resolved Masoud


    hello and thanks for such a good plugin.
    i had wp-rocket plugin (which i know is a paid plugin and i’m neither comparing plugins nor disrespect your efforts).
    later i purchased a host with litespeed, and deleted the wp-rocket.
    but as i checked today, wp-rocket left its code in .htaccess file.
    i compared those codes. and noticed that wp-rocket code has more codes and seemed to be more detailed.

    now my question is should i keep the wp-rocket codes in htaccess?
    or should i delete them? will it cause any harm to my speed?

    please check and see if it’ll cause any confliction with your codes or not.
    the code is :

    # BEGIN WP-Rocket
    # Use UTF-8 encoding for anything served text/plain or text/html
    AddDefaultCharset UTF-8
    # Force UTF-8 for a number of file formats
    <IfModule mod_mime.c>
    AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml
    # FileETag None is not enough for every server.
    <IfModule mod_headers.c>
    Header unset ETag
    # Since we’re sending far-future expires, we don’t need ETags for static content.
    FileETag None
    <IfModule mod_alias.c>
    <FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$">
    <IfModule mod_headers.c>
    Header set X-Powered-By "WP-Rocket"
    Header unset Pragma
    Header append Cache-Control "public"
    Header unset Last-Modified
    <FilesMatch "\.(css|htc|js|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$">
    <IfModule mod_headers.c>
    Header unset Pragma
    Header append Cache-Control "public"
    # Expires headers (for better cache control)
    <IfModule mod_expires.c>
    	ExpiresActive on
    	ExpiresDefault                              "access plus 1 month"
    	# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
    	ExpiresByType text/cache-manifest           "access plus 0 seconds"
    	# Your document html
    	ExpiresByType text/html                     "access plus 0 seconds"
    	# Data
    	ExpiresByType text/xml                      "access plus 0 seconds"
    	ExpiresByType application/xml               "access plus 0 seconds"
    	ExpiresByType application/json              "access plus 0 seconds"
    	# Feed
    	ExpiresByType application/rss+xml           "access plus 1 hour"
    	ExpiresByType application/atom+xml          "access plus 1 hour"
    	# HTC files  (css3pie)
    	ExpiresByType text/x-component              "access plus 1 month"
    # Gzip compression
    <IfModule mod_deflate.c>
    # Active compression
    SetOutputFilter DEFLATE
    # Force deflate for mangled headers
    <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
    SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
    RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
    # Don’t compress images and other uncompressible content
    SetEnvIfNoCase Request_URI \
    \.(?:gif|jpe?g|png|rar|zip|exe|flv|mov|wma|mp3|avi|swf|mp?g|mp4|webm|webp|pdf)$ no-gzip dont-vary
    # Compress all output labeled with one of the following MIME-types
    <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE application/atom+xml \
    		                          application/javascript \
    		                          application/json \
    		                          application/rss+xml \
    		                          application/ \
    		                          application/x-font-ttf \
    		                          application/xhtml+xml \
    		                          application/xml \
    		                          font/opentype \
    		                          image/svg+xml \
    		                          image/x-icon \
    		                          text/css \
    		                          text/html \
    		                          text/plain \
    		                          text/x-component \
    <IfModule mod_headers.c>
    Header append Vary: Accept-Encoding
    # END WP-Rocket

    thanks a lot.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    I’d definitely get rid of them since you’re not using WP Rocket anymore, but if you’re not sure, you can take a backup of them before you delete them so that you can always restore them if necessary.


    Thread Starter Masoud


    hi @tenkstars. thanks for the help. i’m not a pro.
    but from what i understood by looking at the wp-rocket original code was i looked at similarities, and deleted them.
    so the above code is not being produced in lightspeed cache and somehow is missing i guess.
    and if another cache plugin is producing these codes, maybe they are good?
    or maybe lightspeed has not developed their plugin to this extent yet.
    like the Pre-Load Fonts feature, that wp-rocket has and is such a good option to save site loading time by pre-loading them from the server and also suggested by SEO, but lightspeed cache is starting to think of implementing it.

    that’s why i came here to ask for the plugin author/support opinion on this code to see if it’s truly harmful? or is it something that is good to be there…

    • This reply was modified 2 months, 1 week ago by Masoud.

    Those codes are not shared. They are plugin specific. They would not be used by LSCache plugin.

    Plugin Support qtwrk



    the code generated by LiteSpeed Cache plugin should be wrapped by




    Best regards,

    Thread Starter Masoud


    @tenkstars understood. thank you for the help ^_^
    @qtwrk thank you for the info.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.