开发者

Zend framework URLs not working in local environment

开发者 https://www.devze.com 2023-03-19 08:24 出处:网络
I finally got a basic framework set up and working, however now when I wish to add an action in the \'IndexController.php\', it doesn\'t seem to be working.

I finally got a basic framework set up and working, however now when I wish to add an action in the 'IndexController.php', it doesn't seem to be working.

I used the following terminal command to add an "about" action:

zf create action about index

It appears that worked, as I opened 'IndexController.php' back up and the new action function is there. And a corresponding 'about.phtml' file was created in 'views/scripts/index', alongside 'index.phtml' that was already there.

When I a开发者_Python百科ccess the index at

http://localhost3:8888/

the page opens properly.

However if I now try to access the about page at

http://localhost3:8888/index/about

I get a "404 not found" error.

Any ideas?


Looks like a mod_rewrite problem.

Try http://localhost3:8888/index.php/index/about. If it works, then it definitely means that mod_rewrite wasn't correctly set up.

0

精彩评论

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