In the base directory I would add rewrite conditions checking that the directory/file being requested is not a real directory or file. This way any real file/dir you add under your web root will bypass the ZF rewrite rule entirely.

For example:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(pdf|php|js|ico|txt|gif|jpg|png|css|rss|zip|tar\.gz)$ index.php

Nick


On 20 Aug 2007, at 17:42, TravisJ wrote:


I've been having trouble setting up my server so that I can have a public
directory that is not affected by mod_rewrite.

the relevant file structure is:

.htaccess
/app/
/lib/
/www/
/www/index.php
/public/
/public/.htaccess

the base directory .htaccess has:
RewriteEngine on
RewriteRule .* www/index.php

the public directory .htaccess has:
RewriteEngine off

The rewrite engine seems to work to get my bootstrap and related application files working just fine. But it won't turn off for my public directory and still loads the bootstrap and Zend Controller. This is a shared server (via
dreamhost).

Any ideas?


--
View this message in context: http://www.nabble.com/Problems- setting-up-RewriteEngine-tf4300042s16154.html#a12239422
Sent from the Zend Framework mailing list archive at Nabble.com.


Reply via email to