I have implemented a RESTful service by extending the Zend_Rest_Controller. The service works great. I have only one controller that actually has RESTful behavior. So I added the rest route for just that controller in the bootstrap.
protected function _initRestRoute()
{
$this->bootstrap('frontController');
$frontController = Zend_Controller_Front::getInstance();
$restRoute = new Zend_Rest_Route($frontController, array() , array('default' => array('MyserviceController')));
$frontController->getRouter()->addRoute('rest', $restRoute);
}
problem starts when I run my portal zend app. The links in the layout for the index controller miss out on the action parameter when I construct the URL. For example the link on the index layout for a action homepage in the network controller is as follows.
$this->url(array('controller'=>'network','action'=>'homepage','module'=>'default'));
this should return "localhost/projectname/public/network/homepage" instead it returns "localhost/projectname/public/network". This behavior is only when the layout is loaded by the default controller i.e. IndexController. The routing problem vanishes if I remove the zend rest route from the bootstrap. As long as I am mentioning what controller the rest request has to route to it should not be a problem right. But this is affecting the default controller routing.