This is on OS X.
I'm able to get ZF working fine when I only have an IndexController, but calling anything else gives me a 404. The problem is, I'm not being redirected to the bootstrap index.php file. My browser is searching for an actual directory, so my rewrites aren't working.
I've tried every tip I've found, but nothing works. Here's my setup:
In httpd.conf, mod_rewrite is loaded:
Code:
LoadModule rewrite_module libexec/httpd/mod_rewrite.so
Allow override is all:
I have a virtual host pointing directly to my test app:
Code:
<VirtualHost zend.dev:80>
DocumentRoot /Users/me/Sites/conventional/document_root
ServerName zend.dev
</VirtualHost>
My .htaccess in document_root looks like:
Code:
RewriteEngine on
RewriteRule !\.(pdf|php|js|ico|txt|gif|jpg|png|css|rss|zip|tar\.gz)$ index.php
When I type
http://zend.dev/ into my browser, I get my index controller's default action. Great.
But when I try my FooController,
http://zend.dev/foo, I get 404 Not Found.
I can actually type the index page directly, and it works:
http://zend.dev/index.php/foo
... so it seems my .htaccess file just isn't kicking in. What am I missing? Thanks for any help.
One more note: I tried doing all this in my httpd.conf file as suggested in the
wiki,
Code:
<VirtualHost zend.dev:80>
DocumentRoot /Users/me/Sites/modular/document_root
ServerName zend.dev
RewriteEngine off
<Location />
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
</Location>
</VirtualHost>
... but I get 403 permission errors for any page I try to access.