Using Boost in conjunction with Domain Access.

Caching per domain is working nicely, however the .htaccess (which sets the Expires/Cache-Control headers) generated by Boost in the cache folder, is not being generated for all domains.

Looking at the code, one would have to submit a Boost settings form (boost_form_submit_handler()) on each domain to have it generated for each domain.


Philip_Clarke’s picture

That is correct along with boost_form_submit_handler being called by _boost_rmdir the internal cache clearing function.

By submission on any form on any boost form in admin, (since I don't have the domain access module installed), I would guess that if you had two sites, one at and one at, that if you only visited the boost admin section at then you would one generate the .htaccess files for the subfolders under which makes sense as normally modules are enabled on a per domain basis, one site may not want boost.

The only solution is as you have pointed out, is to submit the form on each domain, or write a new module like ctools and path have their own versions to work with domain access. A workaround would be to copy a modified .htaccess file into /cache above normal, which should then not be removed during cache clearance and would provide coverage for the other domains but you would need to work on the FilesMatch directive as although Files

Directives enclosed in a section apply to any file with the specified name, regardless of what directory it lies in.

FilesMatch does not match /

The character "*" matches any sequence of characters, "?" matches any single character, and "[seq]" matches any character in seq. The "/" character will not be matched by any wildcard; it must be specified explicitly.

(from )

You may be able to get around FilesMatch by using the wildcard function for

<Files ~ "\.(gif|jpe?g|png)$">

which may work for sub-directories. Really depends what you have physically in your cache folder.