htaccess Usage
-
Hello,
In my cpanel under optimize website there is an option to “compress all content”. I have this enabled, so was wondering whether i need to include the following in my htaccess when using cache enabler bypassing php?
# gzip HTML file RewriteCond %{ENV:CE_PATH} /$ RewriteCond %{ENV:CE_PATH} !^/wp-admin/.* RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} ="" RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_ RewriteCond %{HTTP:Accept-Encoding} gzip RewriteCond %{DOCUMENT_ROOT}%{ENV:SUB_PATH}%{HTTP_HOST}%{ENV:CE_PATH}index.html.gz -f RewriteRule ^(.*) %{ENV:SUB_PATH}%{HTTP_HOST}%{ENV:CE_PATH}index.html.gz [L] AddType text/html .gz AddEncoding gzip .gz </IfModule>Also, in the settings for the plugin i didn’t select “Pre-compression of cached pages” option and this would give me the following at the end of my page:
<!– Cache Enabler by KeyCDN @ 10.11.2015 17:32:29 (html) –>
After enabling the above option i get the following instead:
<!– Cache Enabler by KeyCDN @ 10.11.2015 17:32:29 (html gzip) –>
Could you tell me how should i be enabling gzip? If i do it globally through cpanel to compress all content, should i disable any gzip compression options in cache enabler? Or is it ok to have gzip enabled in cpanel and in the plugin as they won’t cause a conflict?
Thanks
The topic ‘htaccess Usage’ is closed to new replies.