Forums / General / Static Cache with .htaccess (works fine in httpd.conf)

Static Cache with .htaccess (works fine in httpd.conf)

Author Message

Christoph Polus

Wednesday 07 September 2005 5:24:06 am

Hi

I've got Apache 2 installed, eZ publish 3.6.1.

I've set up eZ with static caching in the httpd.conf successfully, but now I wanted to transfer it into a .htaccess file since I don't have access to the httpd.conf on the server.

I've tried a huge amount of configurations, none would like to work. How do I have to modify the conditions and rules in order to get it work?

I have the following httpd.conf (virtual host section for the site):
RewriteCond d:/dir/to/ez/static/de/index.html -f
RewriteRule ^/$ /static/de/index.html [L]
RewriteCond d:/dir/to/ez/static/de/index.html -f
RewriteRule ^$ /static/de/index.html [L]

RewriteCond d:/dir/to/ez/static/en/index.html -f
RewriteRule ^/$ /static/en/index.html [L]
RewriteCond d:/dir/to/ez/static/en/index.html -f
RewriteRule ^$ /static/en/index.html [L]

RewriteCond %{REQUEST_METHOD} !^POST$
RewriteCond d:/dir/to/ez/static$1/index.html -f
RewriteRule ^(.*)$ /static$1/index.html [L]

RewriteRule !\.(gif|css|jpg|png|jar|ico|js)$ /index.php

These rules work fine in the httpd.conf. But I don't get them to work in my .htaccess file.

Has anybody an idea what to do?
Thanks for any hint.
Chris

Christoph Polus

Thursday 08 September 2005 3:18:08 am

The solution I posted here earlier did not work entirely. Still looking for the whole way through this. Anybody done this before?

Sander van den Akker

Thursday 27 October 2005 5:20:21 am

*kick*
I'm trying to get this working too, using 3.6.3. My .htaccess looks like this:

RewriteCond   /var/www/test/docs/cms/var/cache/static/index.html -f
RewriteRule  ^/$              /var/www/test/docs/cms/var/cache/static/index.html [L]
RewriteCond   /var/www/test/docs/cms/var/cache/static/index.html -f
RewriteRule  ^$               /var/www/test/docs/cms/var/cache/static/index.html [L]

RewriteCond   %{REQUEST_METHOD}       !^POST$
RewriteCond   /var/www/test/docs/cms/var/cache/static$1/index.html -f
RewriteRule   ^(.*)$  /var/cache/static$1/index.html [L]

RewriteRule !\.(gif|jpe?g|png|css|js)|var(.+)storage.pdf(.+)\.pdf$ /var/www/test/docs/cms/index.php

Static cache is not generated. Anyone?

eZ Publish certified developer
http://auth.ez.no/certification/verify/392313

Ekkehard Dörre

Thursday 03 November 2005 12:48:31 am

Hi,
here are the solutions for setup without index.php only with .haccess
http://ez.no/community/forum/install_configuration/htaccess_hidden_at_last

It is not an answer, but perhaps it gives you an idea.

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Christoph Polus

Tuesday 15 November 2005 2:28:05 am

Thanks Ekke :)