Hi!
I have a view that gets its variables through the url. For example:
http://www.====.de/veranstaltungen?filter0=&filter1=&filter2=heute&filter3=
http://www.====.de/veranstaltungen?filter0=289&filter1=&filter2=heute&fi...
The problem is that Boost is not loading the cached versions of these sites.
Boost is loading the cached version of the site 'http://www.====.de/veranstaltungen', but not the ones with variables in their url. These are always shown 'live'.
OK, looking in the boost cache folder, I can find the following files:
veranstaltungen_filter2=heute.html
veranstaltungen_filter0=289&filter2=heute.html
So Boost is indeed caching the sites, but can not find them if the full url with the empty filters (http://www.====.de/veranstaltungen?filter0=&filter1=&filter2=heute&filter3= | http://www.====.de/veranstaltungen?filter0=289&filter1=&filter2=heute&fi...) are called.
Any ideas how I can get Boost to load the cached versions of these sites?
===
My htaccess
### 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\.gz$">
ForceType text/html
</FilesMatch>
<FilesMatch "\.css\.gz$">
ForceType text/css
</FilesMatch>
<FilesMatch "\.js\.gz$">
ForceType text/javascript
</FilesMatch>
# GZIP - Cached css & js files
RewriteCond %{HTTP:Accept-encoding} !gzip
RewriteRule .* - [S=2]
RewriteCond %{DOCUMENT_ROOT}/cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.css\.gz -s
RewriteRule .* cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.css\.gz [L,QSA,T=text/css]
RewriteCond %{DOCUMENT_ROOT}/cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.js\.gz -s
RewriteRule .* cache/gz/%{SERVER_NAME}%{REQUEST_URI}_\.js\.gz [L,QSA,T=text/javascript]
# NORMAL - Cached css & js files
RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}%{REQUEST_URI}_\.css -s
RewriteRule .* cache/%{SERVER_NAME}%{REQUEST_URI}_\.css [L,QSA,T=text/css]
RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}%{REQUEST_URI}_\.js -s
RewriteRule .* cache/%{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$ [OR]
RewriteCond %{REQUEST_URI} (^(admin|cache|misc|modules|sites|system|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]
RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
RewriteCond %{HTTPS} on
RewriteRule .* - [S=3]
# GZIP
RewriteCond %{HTTP:Accept-encoding} !gzip
RewriteRule .* - [S=1]
RewriteCond %{DOCUMENT_ROOT}/cache/gz/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz -s
RewriteRule .* cache/gz/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html\.gz [L,T=text/html]
# NORMAL
RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
RewriteRule .* cache/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]
### BOOST END ###
Comment | File | Size | Author |
---|---|---|---|
#1 | boost-657820.patch | 722 bytes | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedah the problem is filter3= is not there... so I need to remove a check in the boost_init() function; try this patch.
Comment #2
MJH CreditAttribution: MJH commentedThanks for the fast reply The patch works perfectly! My views with url variables are now being cached.
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedComment #4
mikeytown2 CreditAttribution: mikeytown2 commentedcommitted.