Can't cache front page with Boost / Drupal 7

439 Views Asked by At

I've already configure my Drupal site with Boost.

I have tested and everything works but the front page.

Front page gets cached, but it's being regenerated every pageload.

In Boost configurations I set to cache only listed pages and included two options for this purpose: inicio

Inicio is a view, which is my frontpage too.

I want a solution, or a workaround. I don't know how to write .htaccess files. If I would know how to do this I will serve the frontpage with my own rule, in case this page exists... or something like that.

Thanks for your help.

1

There are 1 best solutions below

0
On

Finally! The answer is this:

# Special handling for front page for Apache 2.4
# RewriteCond %{REQUEST_URI} ^/index\.php$
# RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{HTTP_HOST}/\_%{QUERY_STRING}\.html -s
# RewriteRule .* cache/%{ENV:boostpath}/%{HTTP_HOST}/\_%{QUERY_STRING}\.html [L,T=text/html]

You can put this before the .htaccess generated by Boost. Explanations? Here is explained in detail and also the solution: https://www.drupal.org/node/2078595#comment-7885027