Okay i'm stuck with a problem. I use Zend's request routings and it works fine for me. How ever in index.php I want to check if user is logged on or not. If no then route user to index controller login action. How to do it best?
PHP Code:
// check if we are logged in.
// if not direct to the login screen
if ($auth->hasIdentity())
{
try
{
$front->dispatch();
}
catch (Exception $e)
{
echo fnParseException ($e);
}
}
else
{
/*
I experimented with these kind of things - doesn't seem to be working
$request = new Zend_Controller_Request_Http();
$request->setControllerName("index");
$front->setRequest($request);
*/
$front->dispatch();
}