Background, I'm running a Zend Framework application. Trying to squeeze the most performance out of it as possible. So I'm trying to move the rules out of .htaccess exactly to the letter per this blog post by the author of a Zend Framework book: http://www.armando.ws/2009/03/how-to-run-zend-framework-with-no-htaccess-file/
So basically, in httpd.conf, I'm adding an include to conf/extra/httpd-zf.conf which contains the same thing that was in my .htaccess file and working perfectly.
Here's the pertinent code that doesn't function right in httpd-zf.conf:
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L,NC]
RewriteRule ^.*$ /index.php [NC,L]
Controllers work fine. The index.php is seen. But static files don't work. It errors out saying that it isn't a valid controller, so clearly it's being run through index.php.
It's almost as if after running:
RewriteRule ^.*$ - [L,NC]
it keeps right on going. And in point of fact, Removing this line:
RewriteRule ^.*$ /index.php [NC,L]
fixes the static files, but of course breaks the rest of it.
So basically the LAST rule is not working it seems.
Any ideas on getting this to work correctly?
Thank you.
UPDATE
After turning on logging (I had to hike it up to Loglevel 9), it turned out that even though removing RewriteRule ^.*$ /index.php [NC,L] allowed static files to resolve, it was NOT matching on condition RewriteCond %{REQUEST_FILENAME} -s no matter what...it just did "pass through" anyway which allowed the file to show...
so clearly, the fact that .htaccess was on the correct path made it work where the httpd-zf.conf has the wrong path.... There must be a spot somewhere that I can tell httpd-zf.conf what my docroot path is...