Forums / Install & configuration / Static cache problem

Static cache problem

Author Message

Łukasz Kęska

Tuesday 05 May 2009 3:21:53 am

Hi all

I have set the static cache in ezp project I built - everything seems to be running properly - html cache files are collected when I run makestaticcache.php from my terminal, but when I start the page, it is shown in standard way (page is generated thru php, not from static file). Why it doesn't work? It should be switched to html automatically after static cache generating, shouldn't it?

Lucas

Gaetano Giunta

Tuesday 05 May 2009 5:11:43 am

Did you set up proper rewrite rules in your webservers? Without those, the static html files generated by eZP cannot be served...

Principal Consultant International Business
Member of the Community Project Board

Łukasz Kęska

Tuesday 05 May 2009 6:04:35 am

yes, I have set it, here is the content of my htaccess file (looks a little bit messy, sorry) - chillizet is the name of the folder I keep my project in:

php_value allow_call_time_pass_reference 0

RewriteEngine On
RewriteBase /
RewriteRule ^/var/[^/]+/cache/public/.* - [L]

RewriteCond /var/www/chillizet/static/index.html -f
RewriteRule ^/$ /static/index.html [L]
RewriteCond /var/www/chillizet/static/index.html -f
RewriteRule ^$ /static/index.html [L]
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteCond /var/www/chillizet/static$1/index.html -f
RewriteRule ^(.*)$ /static$1/index.html [L]
RewriteRule !\.(gif|css|jpg|png|jar|ico|js)$ /index.php

RewriteRule ^.*externals/(.+)$ externals/$1 [L]

<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html|jar|swf|mp3|xml|flv)|var(.+)storage.pdf(.+)\.pdf)$">
order allow,deny
allow from all
</FilesMatch>

Rewriterule ^/extension/ezvideoflv/design/standard/flash/player.swf - [L]
RewriteRule !\.(gif|jpe?g|png|css|js|swf|mp3|flv|wav|wmv|html?)|stat(.*)|var(.+)storage.pdf(.+)\.pdf$ index.php

#DirectoryIndex index.php

#RewriteEngine On
RewriteCond %{HTTP_HOST} ^webdav\..*
RewriteRule ^(.*) webdav.php [L]

RewriteCond %{HTTP_HOST} ^soap\..*
RewriteRule ^(.*) soap.php [L]

RewriteRule ^var/cache/debug.html.* - [L]
RewriteRule ^var/[^/]+/cache/debug.html.* - [L]
Rewriterule ^var/storage/.* - [L]
Rewriterule ^var/[^/]+/storage/.* - [L]
RewriteRule ^var/cache/texttoimage/.* - [L]
RewriteRule ^/var/[^/]+/cache/public/.* - [L]
RewriteRule ^var/[^/]+/cache/texttoimage/.* - [L]
Rewriterule ^design/[^/]+/(stylesheets|images|javascript)/.* - [L]
Rewriterule ^share/icons/.* - [L]
Rewriterule ^extension/[^/]+/design/[^/]+/(stylesheets|flash|images|javascripts?)/.* - [L]
Rewriterule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]

RewriteRule .* index.php [L]

Łukasz Kęska

Wednesday 06 May 2009 12:54:06 am

would somebody be so nice and advice in this matter? :->