Monday 16 May 2005 2:46:29 am
Hi, I read the staticcache.txt file but still confused on how to integrate the given rule
RewriteEngine On
RewriteLog /tmp/rewrite
RewriteLogLevel 4
RewriteCond /var/www/mydomain/static/fr/index.html -f
RewriteRule ^/$ /static/fr/index.html [L]
RewriteCond /var/www/mydomain/static/fr/index.html -f
RewriteRule ^$ /static/fr/index.html [L]
RewriteCond /var/www/mydomain/static/en/index.html -f
RewriteRule ^/$ /static/en/index.html [L]
RewriteCond /var/www/mydomain/static/en/index.html -f
RewriteRule ^$ /static/en/index.html [L]
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteCond /var/wwww/mydomain/static$1/index.html -f
RewriteRule ^(.*)$ /static$1/index.html [L]
RewriteRule !\.(gif|css|jpg|png|jar|ico|js)$ /index.php
with my current apache virtual host config as shown below.
<VirtualHost *>
DocumentRoot /var/www/mydomain
ServerName www.mydomain.com
ServerAlias mydomain.com
<Directory /var/www/mydomain>
Options FollowSymLinks
AllowOverride None
</Directory>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/webmail.*
RewriteCond %{REQUEST_URI} !^/cgi-bin.*
RewriteCond %{REQUEST_URI} !^/help.*
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteCond %{REQUEST_URI} !^/extension.*
RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages|^/packages|^/share/icons).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf)$ /index.php
</VirtualHost>
my guess was to integrate it this way
<VirtualHost *>
DocumentRoot /var/www/mydomain
ServerName www.mydomain.com
ServerAlias mydomain.com
<Directory /var/www/mydomain>
Options FollowSymLinks
AllowOverride None
</Directory>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/webmail.*
RewriteCond %{REQUEST_URI} !^/cgi-bin.*
RewriteCond %{REQUEST_URI} !^/help.*
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteCond %{REQUEST_URI} !^/extension.*
RewriteLog /tmp/rewrite
RewriteLogLevel 4
RewriteCond /var/www/mydomain/static/fr/index.html -f
RewriteRule ^/$ /static/fr/index.html [L]
RewriteCond /var/www/mydomain/static/fr/index.html -f
RewriteRule ^$ /static/fr/index.html [L]
RewriteCond /var/www/mydomain/static/en/index.html -f
RewriteRule ^/$ /static/en/index.html [L]
RewriteCond /var/www/mydomain/static/en/index.html -f
RewriteRule ^$ /static/en/index.html [L]
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteCond /var/wwww/mydomain/static$1/index.html -f
RewriteRule ^(.*)$ /static$1/index.html [L]
RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages|^/packages|^/share/icons).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf)$ /index.php
</VirtualHost>
Can the Apache expert tells me if on the right track or could someone elaborate on the documentation for static caching?
Thanks Jacques-André
Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch
|