Boost 7.x: installation instructions
1. Goto: [Administer > Configuration > Search and metadata > Clean URLs] and ensure that Drupal's clean URLs are enabled and working correctly on your site.
2. Unzip and upload the module folder (as is) to the sites/all/modules folder in your Drupal installation directory. Enable the module.
3. Goto: [Administer > Configuration > Development > Performance] and disable the Drupal core cache for anonymous users. Boost will not be able to generate its cache if a page is already in the Drupal core cache. This is the only core setting you must disable, others can be left enabled.
4. Goto: [Administer > Configuration > System > Boost > Boost Settings] and review the default settings.
5. Goto: [Administer > Configuration > System > Boost > File System] Make sure that the cache directory is writeable by the web server: you may need to create the directory, and set the permissions. Ideally, the cache directory should be owned by your user and be in the group of your web server ("www-data" on Debian/Ubuntu), with a unix permission of 775 (read/write/exec owner, read/write/exec group, read/exec others).
To check these goto: [Reports -> Status Report]
6. Review the other default Boost settings.
7. IMPORTANT - Back up the original .htaccess file from your Drupal installation directory for safe keeping. In the next step you will edit this file and any mistake may render the site unusable (e.g. 500 Server Error, 404 Not Found etc.)
8. REQUIRED - This step is easy and required for Boost to work! Copy the custom generated htaccess rule from the [Administer > Configuration > System > Boost > .htaccess > .htaccess Generation] page and paste the rules into the Drupal .htaccess file as shown below.
# RewriteBase /
-------paste the rules right here--------
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
# Pass all requests not referring directly to files in the filesystem to
# index.php. Clean URLs are handled in drupal_environment_initialize().
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
Note: If you get "400 Bad Request" responses from Apache server, make sure you have configured the RewriteBase. For example when using VirtualHost configurations it is necessary to define as:
RewriteBase /
The final outcome should be this:
# RewriteBase /
### BOOST START ###
# Allow for alt paths to be set via htaccess rules; allows for cached variants (future mobile support)
RewriteRule .* - [E=boostpath:normal]
# Caching for anonymous users # Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request
RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [OR]
RewriteCond %{REQUEST_URI} (^/(admin|cache|misc|modules|sites|system|openid|themes|node/add|comment/reply))|(/(edit|user|user/(login|password|register))$) [OR]
RewriteCond %{HTTPS} on [OR]
RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [S=3]
# GZIP
RewriteCond %{HTTP:Accept-encoding} !gzip
RewriteRule .* - [S=1]
RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s
RewriteRule .* cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html,E=no-gzip:1]
# NORMAL
RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
RewriteRule .* cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]
### BOOST END ###
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
# Pass all requests not referring directly to files in the filesystem to
# index.php. Clean URLs are handled in drupal_environment_initialize().
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
8. a. IMPORTANT - Note for Windows Users only ...
When you copy the code from the ".htaccess generation" page (admin/config/system/boost/htaccess/generator), you MUST paste it into an editor that will convert the line endings to LF. This problem had me chasing shadows for a good long time. It's likely to occur if you develop on the windows platform but will have your Staging/Production servers on a Linux environment.
Use Notepad++ (free software) to double check the line endings of the .htaccess code you copy. You can do this (once you've installed Notepad++) by making a new document, pasting the .htaccess code into it and going to and clicking on View > Show Symbol > Show End of Line. This will show you whether or not the end-of-line (EOL) characterr is CRLF or LF.
By default, Notepad++ will set the EOL to be the system default - which is CRLF on Windows. You may convert the line endings in the document by going to and clicking on Edit > EOL Conversion > UNIX Format. The character-figure at the end of lines will change from "CRLF" to "LF". Once this is done, it is safe to re-copy the .htaccess code and THEN put that into your .htaccess file.
Line endings and development across systems can be a pain, when working from a Windows machine, always keep it in the back of your mind.
9. Done! Enjoy your boosted Drupal!
10. Optional - enable crawler submodule to pre-cache pages.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion

