Forums / Developer / Rewrite rules for static cache / Comment48674
Stefan de Bruijn
Tuesday 06 November 2007 8:53:08 am
I didn't read the complete instructions on http://ez.no/developer/articles/ez_publish_performance_optimization_part_3_of_3_practical_cache_and_template_solutions/static_cache. There are also instructions on using the cache with multiple site-accesses.
But as far as I understand the rewrite rules (http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html) for the given example don't work:
RewriteCond /home/httpd/ez-3.6/static/news_en/index.html -f RewriteRule ^/$ /static/news_en/index.html [L] RewriteCond /home/httpd/ez-3.6/static/news_en/index.html -f RewriteRule ^$ /static/news_en/index.html [L] RewriteCond /home/httpd/ez-3.6/static/news_fr/index.html -f RewriteRule ^/$ /static/news_fr/index.html [L] RewriteCond /home/httpd/ez-3.6/static/news_fr/index.html -f RewriteRule ^$ /static/news_fr/index.html [L]
If "RewriteCond /home/httpd/ez-3.6/static/news_en/index.html -f" is true, then the root-url ('mydomain.com/) is rewritten to mydomain/static/news_en/index.html and no further rewrites are done. The french siteaccess will only be used if there is no english static cache?!