Closed (fixed)
Project:
Boost
Version:
6.x-1.20
Component:
Installation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 May 2012 at 23:28 UTC
Updated:
7 Jun 2012 at 14:51 UTC
Version 6.x-1.18 had this listed as the configuration text to go into the .htaccess file:
### BOOST START ###
AddDefaultCharset utf-8
<FilesMatch "(\.html|\.xml|\.json)$">
<IfModule mod_headers.c>
Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
</IfModule>
</FilesMatch>
<IfModule mod_mime.c>
AddCharset utf-8 .html
AddCharset utf-8 .xml
AddCharset utf-8 .css
AddCharset utf-8 .js
AddCharset utf-8 .json
</IfModule>
<FilesMatch "(\.html)$">
ForceType text/html
</FilesMatch>
<FilesMatch "(\.xml)$">
ForceType text/xml
</FilesMatch>
<FilesMatch "(\.json|\.js)$">
ForceType text/javascript
</FilesMatch>
<FilesMatch "(\.css)$">
ForceType text/css
</FilesMatch>
# NORMAL - Cached css & js files
RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css -s
RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css [L,QSA,T=text/css]
RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js -s
RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js [L,QSA,T=text/javascript]
# 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 %{HTTP_COOKIE} DRUPAL_UID [OR]
RewriteCond %{HTTPS} on
RewriteRule .* - [S=3]
# NORMAL
RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]
RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml -s
RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml [L,T=text/xml]
RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.json -s
RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.json [L,T=text/javascript]
### BOOST END ###
Now the new version 6.x-1.20 now has just this... is this correct??
### BOOST START ###
# NORMAL - Cached css & js files
RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css -s
RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css [L,QSA,T=text/css]
RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js -s
RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js [L,QSA,T=text/javascript]
# 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
RewriteRule .* - [S=3]
# NORMAL
RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]
RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml -s
RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.xml [L,T=text/xml]
RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.json -s
RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.json [L,T=text/javascript]
### BOOST END ###
Comments
Comment #1
bgm commentedThe removed part has been moved to the config/.htaccess file. That file is auto-generated by boost.
Comment #2
gregarios commentedSo, we no longer need to include it in our site .htaccess file?
Also, does this work even if you have .htaccess disabled server-wide, and just include the main .htaccess file into the server configuration manually?
Comment #3
gregarios commentedWhere exactly is this "config/.htaccess" to be found?
Comment #4
bgm commentedExact. Although you can also just keep it there. It's just that it will cause less problems being more specific to the cache directory (and seems to have been done for performance improvements).
See #856880: Split the htaccess rules in two; slight performance increase.
You will have to include that file as well. Or perhaps more appropriately, add it to the site vhost.
For provision_boost (Aegir), I opened #1598754: Add cache/.htaccess code to the vhost so that we handle this automatically.
Comment #5
bgm commentedoops, meant "cache/.htaccess" (at the root of the Drupal installation, where boost puts its cache).
Comment #6
gregarios commentedOk thank you...
Comment #7.0
(not verified) commentedminor text change.