Zend Framework accessing controllers through URLs
I am starting to learn Zend Framework with book Beginning Zend Framework (Apress), I have trouble aceesing different controllers through URL. I setup the directory structure for Zend Framework and setup Apache2.2\htdocs\testproject\public as the default for localhost. If i try to access a different controller by typing localhost/new I get a 404(Not Found).
My directory structure looks like this:
htdocs
--testproject
----application
------configs
------controllers
--------IndexController.php
--------NewController.php
------models
------views
------Bootstrap.php
----docs
----library
--开发者_StackOverflow中文版--public
----tests
----.zfproject.xml
- Make sure you have enabled apache's
rewrite
module. - Make sure you have
AllowOverride All
in yourhttpd.conf
settings.
Can you confirm above points and restart your apache and try once again? I am sure you won't face this problem again.
精彩评论