Title: Speed Boost Code Breaks Site
Last modified: August 22, 2016

---

# Speed Boost Code Breaks Site

 *  Resolved [9ete](https://wordpress.org/support/users/hawkeye126/)
 * (@hawkeye126)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/speed-boost-code-breaks-site/)
 * Thanks for creating this great plugin!
 * When I add the speed boost code:
 * [http://forum.ait-pro.com/forums/topic/htaccess-caching-code-speed-boost-cache-code/#post-9707](http://forum.ait-pro.com/forums/topic/htaccess-caching-code-speed-boost-cache-code/#post-9707)
 * My website returns a 500 error.
 * I have followed the instructions exactly (I believe).
 * I have added the custom code to this area:
 * CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE:
    Add php.ini handler and/or plugin
   cache code here ONLY add valid htaccess code below or text commented out with
   a pound sign #
 * Then I created a secure .htaccess file.
 * Then I activated Root Folder BulletProof Mode.
 * I have successfully added all the other custom code edits advised.
 * Here is the exact custom code I added:
 *     ```
       # BEGIN WEBSITE SPEED BOOST
       # Time cheat sheet in seconds
       # A86400 = 1 day
       # A172800 = 2 days
       # A2419200 = 1 month
       # A4838400 = 2 months
       # A29030400 = 1 year
   
       # Test which ETag setting works best on your Host/Server/Website
       # with Firefox Firebug, Firephp and Yslow benchmark tests.
   
       # Create the ETag (entity tag) response header field
       #FileETag MTime Size
   
       # Remove the ETag (entity tag) response header field
       Header unset ETag
       FileETag none
   
       <IfModule mod_expires.c>
       ExpiresActive on
       ExpiresByType image/jpg A4838400
       ExpiresByType image/gif A4838400
       ExpiresByType image/jpeg A4838400
       ExpiresByType image/png A4838400
       ExpiresByType video/webm A4838400
       ExpiresByType application/x-shockwave-flash A4838400
       ExpiresByType application/x-javascript A4838400
       ExpiresByType application/javascript A4838400
       ExpiresByType text/javascript A4838400
       ExpiresByType text/css A4838400
       #ExpiresByType text/html A86400
       # Default is 2 days below so the line above is not needed / commented out
       ExpiresDefault A172800
       </IfModule>
   
       <IfModule mod_headers.c>
       <FilesMatch "\.(js|css|flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|gif|jpg|jpeg|png|swf|webm)$">
       Header append Cache-Control "public"
       </FilesMatch>
       <FilesMatch "\.(txt|html)$">
       Header append Cache-Control "proxy-revalidate"
       </FilesMatch>
       <FilesMatch "\.(php|cgi|pl|htm|xml)$">
       Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
       Header set Pragma "no-cache"
       </FilesMatch>
       </IfModule>
   
       <IfModule mod_deflate.c>
       # Insert filters
       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
   
       # Drop problematic browsers
       BrowserMatch ^Mozilla/4 gzip-only-text/html
       BrowserMatch ^Mozilla/4\.0[678] no-gzip
       BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
   
       # Make sure proxies don't deliver the wrong content
       Header append Vary User-Agent env=!dont-vary
       </IfModule>
       # END WEBSITE SPEED BOOST
       ```
   
 * I am using the latest WordPress, single install, on **Linode**.
 * I am also using **W3 Total Cache**
 * [https://wordpress.org/plugins/bulletproof-security/](https://wordpress.org/plugins/bulletproof-security/)

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

 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/speed-boost-code-breaks-site/#post-5203008)
 * If you are already using W3TC browser caching then the Speed Boost Cache code
   will probably not add a speed increase.
 * Things to check:
 * If you have cPanel on your hosting then make sure that you have locked your root.
   htaccess file on the htaccess File Editor tab page.
 * The Speed Boost cache code MUST go after the W3TC cache code in this Custom Code
   text box: CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE. Note: if you are using
   W3TC browser caching then you will probably not notice any speed improvements
   since W3TC browser cache code is pretty much doing the exact same thing that 
   the Speed Boost cache code is doing – Browser Cache.
 * w3tc cache code
    speed boost cache code
 * I have seen 1 case so far where a web host was not allowing the “Header” .htaccess
   directive. So that all code that is using “Header” had to be deleted in order
   for that person to use the speed boost code.
 *  Thread Starter [9ete](https://wordpress.org/support/users/hawkeye126/)
 * (@hawkeye126)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/speed-boost-code-breaks-site/#post-5203015)
 * Thank you, I will not add the code then.
 * Keep up the great work.

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

The topic ‘Speed Boost Code Breaks Site’ is closed to new replies.

 * ![](https://ps.w.org/bulletproof-security/assets/icon-128x128.png?rev=1731938)
 * [BulletProof Security](https://wordpress.org/plugins/bulletproof-security/)
 * [Support Threads](https://wordpress.org/support/plugin/bulletproof-security/)
 * [Active Topics](https://wordpress.org/support/plugin/bulletproof-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bulletproof-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bulletproof-security/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [9ete](https://wordpress.org/support/users/hawkeye126/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/speed-boost-code-breaks-site/#post-5203015)
 * Status: resolved