Problem with Zend_Cache_Backend_Static rewrite rules

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with Zend_Cache_Backend_Static rewrite rules

holografix
I have virtual hosts in apache with the rewrite rules inside <Location /></Location>
<Location />
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} -s [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^.*$ /index.php [NC,L]
</Location>     

To cache entire pages, bypassing PHP and ZF I tried this rules after RewriteEngine On but they don´t work.

RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{DOCUMENT_ROOT}/cached/index.html -f
RewriteRule ^/*$ cached/index.html [L]

RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{DOCUMENT_ROOT}/cached/%{REQUEST_URI}\.html -f
RewriteRule .* cached/%{REQUEST_URI}\.html [L]

It works fine if I comment entire <Location /> section in httpd.conf and use a .htaccess file.
Need some help to put this rules in vhost.

Cheers,
holo

Reply | Threaded
Open this post in threaded view
|

Re: Problem with Zend_Cache_Backend_Static rewrite rules

A.J. Brown-3
Were you reloading apache with /etc/init.d/apache2 reload ?  config
file changes require a reload, .htaccess changes do not.

To clarify, you have your location tag like this, right?

 <Location />
         RewriteEngine On

         RewriteCond %{REQUEST_METHOD} GET
         RewriteCond %{DOCUMENT_ROOT}/cached/%{REQUEST_URI}\.html -f
         RewriteRule .* cached/%{REQUEST_URI}\.html [L]

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

On Wed, Apr 7, 2010 at 7:43 AM, holografix . <[hidden email]> wrote:

> I have virtual hosts in apache with the rewrite rules inside <Location
> /></Location>
> <Location />
>         RewriteEngine On
>         RewriteCond %{REQUEST_FILENAME} -s [OR]
>         RewriteCond %{REQUEST_FILENAME} -l [OR]
>         RewriteCond %{REQUEST_FILENAME} -d
>         RewriteRule ^.*$ - [NC,L]
>         RewriteRule ^.*$ /index.php [NC,L]
> </Location>
>
> To cache entire pages, bypassing PHP and ZF I tried this rules after
> RewriteEngine On but they don´t work.
>
> RewriteCond %{REQUEST_METHOD} GET
> RewriteCond %{DOCUMENT_ROOT}/cached/index.html -f
> RewriteRule ^/*$ cached/index.html [L]
>
> RewriteCond %{REQUEST_METHOD} GET
> RewriteCond %{DOCUMENT_ROOT}/cached/%{REQUEST_URI}\.html -f
> RewriteRule .* cached/%{REQUEST_URI}\.html [L]
>
> It works fine if I comment entire <Location /> section in httpd.conf and use
> a .htaccess file.
> Need some help to put this rules in vhost.
>
> Cheers,
> holo
>
>



--
A.J. Brown
Software Engineer, ZCE
blog : http://ajbrown.org
talk  : (937) 540-0099
chat : IntypicaAJ