Boost not working on pages with ?_utma Google Analytics cookie in url Boost works on every page, but it doesn't work on pages with Google Analytics variable in the URL. For example, http://stratton.wanderlustfestival.com/?__utma=1.485948833.1348167330.1348796515.1348837057.31&amp;__utmb=1.3.9.1348837058695&amp;__utmc=1&amp;__utmx=-&amp;__utmz=1.1348167330.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)&amp;__utmv=-&amp;__utmk=172983075 doesn't show &lt;!-- Page cached by Boost @ 2012-09-27 16:23:18, expires @ 2012-09-28 04:23:18 --&gt; while http://stratton.wanderlustfestival.com does.
Boost saves the page cache in a file named after the page + the query string, the limit on the length of a filename is 255 in Linux so for pages with very long name/query string combinations caching will fail. 

This should show up as an error in the Drupal log and if it does the solution is edit the .htaccess: Find the comment "Caching for anonymous users", after this you'll find a line "RewriteRule .* - [S=4]", replace this line with the following code:

RewriteRule .* - [S=6]

# If the page/query string combination is not over 255 characters, skip the following 2 rewrites
RewriteCond %{QUERY_STRING} "utm_campaign"
RewriteCond %{QUERY_STRING} "utm_medium"
RewriteCond %{REQUEST_URI}_%{QUERY_STRING} ^(.*\/)([^\/\n]{0,255})$
RewriteRule .* - [S=2]

# Custom Campaign Query
# Create file if not already boosted
# One campaign item is lost for file creation.
ReWriteCond %{QUERY_STRING} "utm_campaign"
ReWriteCond %{QUERY_STRING} "utm_medium"
RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{HTTP_HOST}%{REQUEST_URI}_\.html !-s
ReWriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI}? [L,T=text/html]

# Boosted file for campaign (now with query string).
ReWriteCond %{QUERY_STRING} "utm_campaign"
ReWriteCond %{QUERY_STRING} "utm_medium"
RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{HTTP_HOST}%{REQUEST_URI}_\.html -s
RewriteRule .* cache/normal/%{HTTP_HOST}%{REQUEST_URI}_\.html [L,T=text/html]


This makes sure that if the page/analytics query string combination is too long it will cache the page without query string instead, the first request will be redirected to the page without the Analytics query string, the next request will be served from cache and the query string will stay intact.

Note that this code is aimed at long url's with Google Analytics tracking variables only but can be (and possibly should be) rewritten so it can be used universally.