Hi

Can't seem to figure this out. I have drupal installed in a sub-directory "drupal". I see that cached files are being created and I can navigate to them directly. But they don't seem to be displayed to anonymous users (the comment at the bottom is missing)

the log comes back looking ok i think:
Debug: _boost_ob_handler()
HTTP Info: 200 - text/html
Path: cache/normal/omaha.net/neighborhoods_.html
Content Container: page_manager_page_execute
Content Type: neighborhoods
ID: 4
Cache This: TRUE.

i've attached my htaccess file.. really not sure what's going on.. is there other info required to diagnose this?

CommentFileSizeAuthor
htaccess.txt6.47 KBlocomo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

on the performance/boost configuration page change "%{SERVER_NAME}" to "%{HTTP_HOST}"; if that doesn't work try the last option under Servers URL or Name:
Save; grab update rules from boost-rules and try again.

locomo’s picture

thanks for getting back to me. I had actually tried those options already.. I just tried them again to make sure, but still no luck.

any other ideas?

mikeytown2’s picture

Just for kicks remove this from your htaccess file and see if you can get boosted pages; if yes then we hopefully isolated the issue

  # 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 %{HTTP:Pragma} no-cache [OR]
  RewriteCond %{HTTP:Cache-Control} no-cache [OR]
  RewriteCond %{HTTPS} on
  RewriteRule .* - [S=3]
locomo’s picture

arg .. tried this but still no luck

anything else i can comment out to try and isolate the problem?

happy new year!!!

mikeytown2’s picture

try setting "Servers URL or Name" & "Document Root" to the last options on the radio buttons; the ones without a %. Save and get rules from boost-rules page, hopefully that gets it working in your case; if not, giving me a dump (print_r) of your $_SERVER values might be helpful.

dsnydernc’s picture

I'm having a similar issue, unsure if it's exactly the same problem though. Cache files are all being created in the file system, however only the front page of my site generates the comment at the bottom of the source, so as far as I can tell this is the only page being delivered by Boost. Any ideas as to why only the front page would be delivered properly?

I have also tried all the advice above.

UPDATE
I have no idea how this had anything to do with Boost - but I've solved this issue. I was using the Advanced Statistics Settings module, and after all day of troubleshooting an issue trying to figure out why pages were generated quickly for logged in users, and slowly for anonymous users, I eventually discovered it was the AS module querying the database unnecessarily. After disabling that module, Boost is now serving all my pages correctly. I'm not an expert, so I can't link the two or explain why there was a conflict, but that was definitely the cause in my case.

mikeytown2’s picture

If php times out; error out in the hook_exit phase then that would explain the issue. The page cache save code runs as a shutdown function, so it could never be called if php doesn't finish correctly.

locomo’s picture

still no luck .. here's my dump of $_SERVER:

... removed for security ...

mikeytown2’s picture

One issue I found in the server dump is ["DOCUMENT_ROOT"]=> string(23) "/home/omaha/public_html". In your first post you stated that you have drupal installed in a sub-directory "drupal"; yet that doesn't appear anywhere in the $_SERVER variable array. If this is the case then you might have to add it into the htaccess rules manually. To do this set the "Servers URL or Name" & "Document Root" to the last options on the radio buttons; the ones without a %. Upload that and if I could get the working directory of drupal's index.php that would be good.

locomo’s picture

drupal's index.php is located in "/home/omaha/public_html/drupal"

thanks!

mikeytown2’s picture

still need the rules from /boost-rules with the last options on the radio buttons
Servers URL or Name:
Document Root:
in /boost selected under "Boost Apache .htaccess Settings Generation"

locomo’s picture

here they are:

  ### BOOST START ###
  AddDefaultCharset utf-8
  FileETag MTime Size
  <FilesMatch "(\.html|\.html\.gz)$">
    <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 .css
    AddCharset utf-8 .js
    AddEncoding gzip .gz
  </IfModule>
  <FilesMatch "(\.html|\.html\.gz)$">
    ForceType text/html
  </FilesMatch>
  <FilesMatch "(\.js|\.js\.gz)$">
    ForceType text/javascript
  </FilesMatch>
  <FilesMatch "(\.css|\.css\.gz)$">
    ForceType text/css
  </FilesMatch>

  # Gzip Cookie Test
  RewriteRule boost-gzip-cookie-test\.html  cache/perm/boost-gzip-cookie-test\.html\.gz [L,T=text/html]

  # GZIP - Cached css & js files
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=2]
  RewriteCond /home/omaha/public_html/drupal/cache/perm/omaha.net%{REQUEST_URI}_\.css\.gz -s
  RewriteRule .* cache/perm/omaha.net%{REQUEST_URI}_\.css\.gz [L,QSA,T=text/css]
  RewriteCond /home/omaha/public_html/drupal/cache/perm/omaha.net%{REQUEST_URI}_\.js\.gz -s
  RewriteRule .* cache/perm/omaha.net%{REQUEST_URI}_\.js\.gz [L,QSA,T=text/javascript]

  # NORMAL - Cached css & js files
  RewriteCond /home/omaha/public_html/drupal/cache/perm/omaha.net%{REQUEST_URI}_\.css -s
  RewriteRule .* cache/perm/omaha.net%{REQUEST_URI}_\.css [L,QSA,T=text/css]
  RewriteCond /home/omaha/public_html/drupal/cache/perm/omaha.net%{REQUEST_URI}_\.js -s
  RewriteRule .* cache/perm/omaha.net%{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 %{HTTP:Pragma} no-cache [OR]
  RewriteCond %{HTTP:Cache-Control} no-cache [OR]
  RewriteCond %{HTTPS} on
  RewriteRule .* - [S=3]

  # GZIP
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=1]
  RewriteCond /home/omaha/public_html/drupal/cache/normal/omaha.net%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s
  RewriteRule .* cache/normal/omaha.net%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html]

  # NORMAL
  RewriteCond /home/omaha/public_html/drupal/cache/normal/omaha.net%{REQUEST_URI}_%{QUERY_STRING}\.html -s
  RewriteRule .* cache/normal/omaha.net%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]

  ### BOOST END ###
locomo’s picture

sorry for the bump, but wondering what you had in mind for me to try next

thanks

locomo’s picture

Version: 6.x-1.x-dev » 6.x-1.18

hi,

i just thought I'd try to get this running again. I uninstalled boost completely and reinstalled 6.x-1.18

My drupal install is located here:
/home/omaha/public_html/drupal

I'm using .htaccess in public_html to redirect to the drupal directory so users see URLs like http://omaha.net/about

I can confirm that boost pages are being generated here:
/home/omaha/public_html/drupal/cache

for example:
/home/omaha/public_html/drupal/cache/normal/omaha.net/about_.html
/home/omaha/public_html/drupal/cache/normal/omaha.net/about_.html.gz

but when viewing the site as an anonymous user the boosted pages are not displayed

any help would be so so so appreciated!

here is my .htaccess at:
/home/omaha/public_html

RewriteEngine On

# Redirect root page to drupal home (if desired)
# NOTE: without trailing slash, external redirect to /drupal will
# be used and it will show up in browser. With slash, hidden.
RewriteRule ^$ drupal/ [L]
# RewriteRule ^$ index.html [L]

# Rewrite non-file/directory URL's to be under drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ drupal/$1 [L]

and this is my .htaccess located at:
/home/omaha/public_html/drupal

## Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Ta
g|Template|all-wcprops|entries|format)$">
  Order allow,deny
</FilesMatch>

# Don't show directory listings for URLs which map to a directory.Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php

# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
  # There is no end quote below, for compatibility with Apache 1.3.
  ErrorDocument 404 "The requested file favicon.ico was not found."
</Files>

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

  <FilesMatch \.php$>
    # Do not allow PHP scripts to be cached unless they explicitly send cache
    # headers themselves. Otherwise all scripts would have to overwrite the
    # headers set by mod_expires if they want another caching behavior. This may
    # fail if an error occurs early in the bootstrap process, and it may cause
    # problems if a non-Drupal PHP file is installed in a subdirectory.
    ExpiresActive Off
  </FilesMatch>
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
    RewriteCond %{HTTP_HOST} ^www\.omaha\.net$ [NC]
    RewriteRule ^(.*)$ http://omaha.net/$1 [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  ### BOOST START ###
  AddDefaultCharset utf-8
  <FilesMatch "(\.html|\.html\.gz)$">
    <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 .css
    AddCharset utf-8 .js
    AddEncoding gzip .gz
  </IfModule>
  <FilesMatch "(\.html|\.html\.gz)$">
    ForceType text/html
  </FilesMatch>
  <FilesMatch "(\.js|\.js\.gz)$">
    ForceType text/javascript
  </FilesMatch>
  <FilesMatch "(\.css|\.css\.gz)$">
    ForceType text/css
  </FilesMatch>

  # Gzip Cookie Test
  RewriteRule boost-gzip-cookie-test\.html  cache/perm/boost-gzip-cookie-test\.html\.gz [L,T=text/html]

  # GZIP - Cached css & js files
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=2]
  RewriteCond /home/omaha/public_html/drupal/cache/perm/omaha.net%{REQUEST_URI}_\.css\.gz -s
  RewriteRule .* cache/perm/omaha.net%{REQUEST_URI}_\.css\.gz [L,QSA,T=text/css]
  RewriteCond /home/omaha/public_html/drupal/cache/perm/omaha.net%{REQUEST_URI}_\.js\.gz -s
  RewriteRule .* cache/perm/omaha.net%{REQUEST_URI}_\.js\.gz [L,QSA,T=text/javascript]

  # NORMAL - Cached css & js files
  RewriteCond /home/omaha/public_html/drupal/cache/perm/omaha.net%{REQUEST_URI}_\.css -s
  RewriteRule .* cache/perm/omaha.net%{REQUEST_URI}_\.css [L,QSA,T=text/css]
  RewriteCond /home/omaha/public_html/drupal/cache/perm/omaha.net%{REQUEST_URI}_\.js -s
  RewriteRule .* cache/perm/omaha.net%{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 %{HTTP:Pragma} no-cache [OR]
  RewriteCond %{HTTP:Cache-Control} no-cache [OR]
  RewriteCond %{HTTPS} on
  RewriteRule .* - [S=3]

  # GZIP
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=1]
  RewriteCond /home/omaha/public_html/drupal/cache/normal/omaha.net%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s
  RewriteRule .* cache/normal/omaha.net%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html]

  # NORMAL
  RewriteCond /home/omaha/public_html/drupal/cache/normal/omaha.net%{REQUEST_URI}_%{QUERY_STRING}\.html -s
  RewriteRule .* cache/normal/omaha.net%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]

  ### BOOST END ###


  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.90.2.4 2009/12/07 12:00:40 goba Exp $
                                                             

thanks!

mikeytown2’s picture

try this (permissions issues)
http://drupal.org/node/722514#comment-2642612

locomo’s picture

What are the correct permissions? Boost is creating these files/folders and setting permissions itself so I'm not sure what the correct settings should be.

It looks like it is setting directories to 775 and the actual cached files to 644

Thanks!!

mikeytown2’s picture

apache my not be able to access the files for some odd reason; try 777 (dir) and 666 (files).

locomo’s picture

hmmm .. i just changed all of my permissions and no luck

this is so weird.. i'm having the feeling that i must be doing something really stupid

i can browser to a cached file directly
http://omaha.net/drupal/cache/normal/omaha.net/about_.html

i appreciate your help.. any other thoughts?

mikeytown2’s picture

Just for kicks temporarily remove your .htaccess file, see if Clean URL's still work. If they still work with that file gone, then you need to put these rules at a higher level of your apache configuration; most likely in httpd.conf.
http://httpd.apache.org/docs/trunk/configuring.html

alwaysxhh’s picture

I've had the same problem with you. I installed drupal on a subdirectory named drupal instead of the root directory public_html.
After days of tweaking, I finally got BOOST works on my site(www.gleanergames.com). Here are my solutions:

  1. Open and edit the file /public_html/drupal/.htacess. Remove all BOOST code from it and save the file.
  2. Open the file /public_html/.htacess(which is in the parent directory of your drupal subdirectory) and insert all the BOOST code into this file.
  3. Change all the lines RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\. to RewriteCond %{DOCUMENT_ROOT}/drupal/cache/perm/%{HTTP_HOST}%{REQUEST_URI}_\..
  4. Change all the RewriteRule .* cache/normal/.... to RewriteRule .* drupal/cache/normal/...
  5. The code should now read like this:
    RewriteCond %{DOCUMENT_ROOT}/drupal/cache/normal/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
      RewriteRule .* drupal/cache/normal/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]
  6. Save and upload the files.

Hope these work for you.

locomo’s picture

OMG - AWESOME

I have boosted pages now and my site is flying!!

@alwaysxhh - that totally worked thank you!! any chance you live in brooklyn? i'll gladly buy you a beer

@mikeytown2 - i tried your last suggestion but it immediately broke the site .. 500 server error .. thank you for your patience in helping me troubleshoot - this module is great .. any chance you live in brooklyn? i'll gladly buy you a beer :)

I have no idea if my drupal install and server setup is atypical, but it might be cool to include this fix in the README if other folks are having this problem

cheers!

mikeytown2’s picture

Status: Active » Reviewed & tested by the community

Cool, I'll make a note of this in the documentation soon.

@alwaysxhh
Thanks for your help on this one :)

mikeytown2’s picture

@locomo
Just wondering, what does your full .htaccess file look like in /home/omaha/public_html?

locomo’s picture

here 'tis

RewriteEngine On

  ### BOOST START ###  AddDefaultCharset utf-8
  <FilesMatch "(\.html|\.html\.gz)$">
    <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 .css
    AddCharset utf-8 .js
    AddEncoding gzip .gz
  </IfModule>
  <FilesMatch "(\.html|\.html\.gz)$">
    ForceType text/html
  </FilesMatch>
  <FilesMatch "(\.js|\.js\.gz)$">
    ForceType text/javascript
  </FilesMatch>
  <FilesMatch "(\.css|\.css\.gz)$">
    ForceType text/css
  </FilesMatch>

  # Gzip Cookie Test
  RewriteRule boost-gzip-cookie-test\.html  cache/perm/boost-gzip-cookie-test\.html\.gz [L,T=text/html]

  # GZIP - Cached css & js files
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=2]
  RewriteCond %{DOCUMENT_ROOT}/drupal/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css\.gz -s
  RewriteRule .* drupal/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css\.gz [L,QSA,T=text/css]
  RewriteCond %{DOCUMENT_ROOT}/drupal/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js\.gz -s
  RewriteRule .* drupal/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js\.gz [L,QSA,T=text/javascript]

  # NORMAL - Cached css & js files
  RewriteCond %{DOCUMENT_ROOT}/drupal/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css -s
  RewriteRule .* drupal/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.css [L,QSA,T=text/css]
  RewriteCond %{DOCUMENT_ROOT}/drupal/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_\.js -s
  RewriteRule .* drupal/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 %{HTTP:Pragma} no-cache [OR]
  RewriteCond %{HTTP:Cache-Control} no-cache [OR]
  RewriteCond %{HTTPS} on
  RewriteRule .* - [S=3]

  # GZIP
  RewriteCond %{HTTP_COOKIE} !(boost-gzip)
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=1]
  RewriteCond %{DOCUMENT_ROOT}/drupal/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s
  RewriteRule .* drupal/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html]

  # NORMAL
  RewriteCond %{DOCUMENT_ROOT}/drupal/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
  RewriteRule .* drupal/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]

  ### BOOST END ###


# Redirect root page to drupal home (if desired)
# NOTE: without trailing slash, external redirect to /drupal will
# be used and it will show up in browser. With slash, hidden.
RewriteRule ^$ drupal/ [L]
# RewriteRule ^$ index.html [L]

# Rewrite non-file/directory URL's to be under drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ drupal/$1 [L]


alwaysxhh’s picture

locomo, mikeytown2

You are welcome.

nardberjean’s picture

I observed a similar issue, and solved it by selecting the whole path instead of the constant %{DOCUMENT_ROOT} .

butler360’s picture

I'm having the same problem (everything says it's OK on the status page, cache files created, no sign of boost comment in HTML) but with my Aegir sites. I've tried the Provision module, as well, but same results. Should I open a new issue?

WoozyDuck’s picture

I have this issue as well, I have also moved the website to the root but still no lick
Tried all the suggestions but still no chance to see the cached page

WoozyDuck’s picture

I have tried your solution but still no luck for me!
Plus I now get the following error:

htaccess file does not contain or match the boost specific rewrite rules, or the rewrite rules have changed, due to new settings, and they need to be updated. Get the rules: Boost Apache .htaccess settings generation

Toxid’s picture

I've got exactly the same problem. I'm using xampp. One curious thing I've discovered is that the pagers in my gallery is broken. I'm using custom pagers with views gallery, and some times when I press previous or next it leads to a "page not found". It makes me think it's got something to do with url aliases.

vinoth.3v’s picture

I've got exactly the same problem.

mikeytown2’s picture

@Toxid, @vinoth.3v
if your using xampp on windows there are some filenames that "confuse" apache, saying the file exists but when you try to access it, it doesn't work. I do my best to prevent these URL's from being cached (as it will result in a 404) but I might have missed something.

/**
 * Determines whether a given url can be cached or not by boost.
 *
 * To avoid potentially troublesome situations, the user login page is never
 * cached, nor are any admin pages.
 *
 * @param $path
 *   Current URL
 *
 * $path = $GLOBALS['_boost_path'] most of the time
 * uses $GLOBALS['_boost_query'] as well
 */
function boost_is_cacheable($path) {

...

  // Check for reserved characters if on windows
  // en.wikipedia.org/wiki/Filename#Reserved_characters_and_words
  // " * : < > |
  $chars = '"*:<>|';
  if (stristr(PHP_OS, 'WIN') && preg_match("/[" . $chars . "]/", $full)) {
    return FALSE;
  }

...

}

Can I get example URL's and file names from you? I don't need your domain name just everything after the .com if you know what I mean.

Toxid’s picture

I'm on windows, but I discovered that the 404 problem wasn't because of boost. It happens even if I'm logged in as administrator and if boost is disabled, so I think it's the latest views version that causes that problem. I still can't get boost to serve chached pages to anonymous users though. They are created but not served.

vinoth.3v’s picture

Hi

Thanks for the reply.

I am using boost on http://tamil2friends.com (in Tamil Language)

Boost settings:

Only allow ASCII characters in path : DISABLED
Boost - HTML - Default maximum cache lifetime: 30 mins
Clear expired pages on cron runs: ENABLED (cpanel cron for every 15 mins)
Boost Retro Mode : DISABLED
built-in cron crawler : DISABLED
Set Header and tags: ENABLED (where I can find these tags? )
Check database timestamps for any site changes: DISABLED

I am not sure whether it is working or..

mkalbere’s picture

Same issue with drupal installed in a subfolder thanks alwaysxhh ! your #20 did the trick !

Toxid’s picture

Boost worked for me on a clean installation. I enabled the core cache for a short period of time, then I noticed that boost cache wasn't being served. I disabled core cache but still no pages from boost.

mikeytown2’s picture

@Toxid
Does #20 fix the issue for you? Have you tried different settings for your htaccess file?
#800408: Follow core and use HTTP_HOST as the default htaccess rules - Related htaccess change

Toxid’s picture

#20 doesn't work for me. The weird thing is that it worked before I enabled core caching. Why would the settings change?

Toxid’s picture

Good news, I got it working again. I took the default.txt and made my .htaccess. Then I pasted the generated rules and it worked after that. Appearantly my .htaccess was changed somewhere. Does core cache change .htaccess?

mikeytown2’s picture

Issue tags: +Documentation

adding documentation tag
#20

Agogo’s picture

Just a word of advise: use the in core Database Logging module to resolve if there are any regular errors before trying anything else. Boost is for example set by default not to use its cached pages if theres an error on the page - even a php error.

TimG1’s picture

Hi All,

Just wanted to confirm that #20 worked for me. I have drupal in a subdirectory too.

The only thing is that if I run cron manually, I now see an error from the Boost module...

".htaccess file
.htaccess file does not contain or match the boost specific rewrite rules, or the rewrite rules have changed, due to new settings, and they need to be updated. Get the rules: Boost Apache .htaccess settings generation."

However boost seems to be working fine. The boost tags appear when viewing source and the pages are loading *much* faster now!

Would be nice if that cron error didn't show though.

Thanks for reading,
-Tim

pearlzh’s picture

Issue tags: -Documentation

The same problem here. I have drupal in a subdirectory, and I see pages cached, but they were not served, and unfortunately #20 doesn't work for me. Finally when I set Servers URL or Name and Document Root to the last option, and copied the rule to htaccess under drupal, and removed as #3 instructs, then all works. BTW, core cache was enabled, and then disabled before it worked, not knowing if this could affect anything.

I see there is a tag "documentation". Maybe I added it by mistake, so can anyone help me remove it? Thanks

Added after I tried again:

I found that under publich_html there was a cache directory which may have been generated by boost when I still had drupal under public_html instead of public_html/drupal. I deleted it and all files inside, and simply pasted Boost htaccess rules generation (from Home » Administer » Site configuration » Performance) again in public_html/drupal/.htaccess, and then all worked.

naero’s picture

I did exactly what #43, #20, and #3 said, and this solved my issue of not serving up cached pages with the "Boost" code inserted at the bottom of the page. I think #3 helped out the most.

naero’s picture

Now that I look closer, I think it's because all of my pages (at the moment) are being served through an https:// address, and not http://. Thus, when I comment out those conditions (per comment #3 above), this served the Boost cached pages. Just thought I'd add this.

drifter’s picture

I also had the same symptoms as #6: front page is cached and served by boost, other pages have generated caches but aren't being served. Turns out I didn't read the instructions and copied the config to the bottom of the .htaccess file, instead of the proper place in the Rewrite section. Moving it solved it for me.

Jumoke’s picture

#20 worked for me only, but the thing is when i log off and try to access the pages, it's asking me to download .gz files. What is gong on?

Jumoke’s picture

Can someone review my post here please? http://drupal.org/node/1069182
I am still on this for 2 days now : ( my cache is still not displaying

bgm’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (fixed)

No activity for the past 2 years. Closing the support request.