Hi
I have an application in a VPS and I want some pages cached and avoid PHP/ZF
when they are requested.

Vhost definition is like this:
<VirtualHost *:80>
    ServerName www.app.com
    DocumentRoot "/www/sites/app/public"

    SetEnv APPLICATION_ENV production

    <Location />
        RewriteEngine On

        # ============ FROM THE MANUAL ============
        RewriteCond %{DOCUMENT_ROOT}/cached/index.html -f
        RewriteRule ^/*$ cached/index.html [L]

        RewriteCond
%{DOCUMENT_ROOT}/cached/%{REQUEST_URI}.(html|xml|json|opml|svg) -f
        RewriteRule .* cached/%{REQUEST_URI}.%1 [L]
        # =========================================

        RewriteCond %{REQUEST_FILENAME} -s [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^.*$ /index.php [NC,L]
    </Location>
</VirtualHost>


The pages are generated but they are generated every request so there is no
cache benefit.
These rules are wrong. They don't force apache to serve the html cached
files.
Need some help with this.

Thanks in advance.

cheers
holo

Reply via email to