开发者

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


  1. Make sure you have enabled apache's rewrite module.
  2. Make sure you have AllowOverride All in your httpd.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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜