I have a front controller that works. I wrote a login controller called AuthController.php. It is configured with the appropriate code inside. My problem is when I go to /auth I get a 404. It seems to be some sort of routing problem.
My auth controller is called AuthController.php and the top part of it looks like this:
class AuthController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
$form = new Application_Form_Login();
$request = $this->getRequest();
if ($request->isPost()) {
if ($form->isValid($request->getPost())) {
if ($this->_process($form->getValues())) {
// We're authenticated! Redirect to the home page
$this->_helper->redirector('index', 'index');
}
}
}
$this->view->form = $form;
}
and of course there are protected functions below that handle other things. In Zend, when you create a new controller, doesn’t just its existence (like in CodeIgniter) mean it should be available? Or do I have to add it to a routing table somewhere?
EDIT: Here is my Apache Vhost config:
<VirtualHost *:80>
ServerName new.mydomain.com
DocumentRoot /www/htdocs/zend/public
<Directory /www/htdocs/zend/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
have put your IndexController.php into)
If all of this is correct then it should work just fine.