I recently started a new zend framework project. I created all the db-table models, models, controllers, actions, forms and enabled layouts via the ZF Tool. All of the items I created show up in .zf-project.xml.
I then set about setting up the first header and footer for the default layout. At the bottom of this layout is a footer nav section with several links for example:
<a href="/howitworks">How it Works</a>
When this is clicked it should navigate to the index controller / howitworksAction however it doesn't. Instead I get an error stating:
Message: Invalid controller specified (howitworks)
**Stack trace:**
#0 /usr/share/php/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /usr/share/php/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#2 /usr/share/php/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#3 /var/www/vhosts/lokals.mediagiantdesign.com/httpdocs/public/index.php(26): Zend_Application->run()
#4 {main}
Request Parameters:
array (
'controller' => 'howitworks',
'action' => 'index',
'module' => 'default',
)
If I force the URL to /index/howitworks it works fine. I am totally thrown off by this as this is the first Zend application that I have built where this has ever happened. In previous applications this linking worked right out of the box. I haven't setup a custom router, the bootstrap is barebones. So I have no idea why this isn't working.
I thought zend first looked for a controller matching the controller, if not found it looked in index looking for an action that matched, and if that wasn't found, it would assume it was a file in /public. If that's the case, then what am I missing here?
Thanks in advance. Rick