1

Zend framework 1.7. I have a Restful controller with restfull routes. http://framework.zend.com/manual/1.12/en/zend.controller.router.html#zend.controller.router.routes.rest

$front     = Zend_Controller_Front::getInstance();
$restRoute = new Zend_Rest_Route($front, array(), array(
    'product' => array('ratings')
));
$front->getRouter()->addRoute('rest', $restRoute);

In ratings controller I have an indexAction that respond to http get request from url product/ratings/

Now in ratings controller I am adding a new action: browseAction. I want when digit the url product/ratings/browse respond the indexAction. Is possible to configure the router ?

1
  • 1
    Would be more helpful if you post the solution as an independent answer and choose it as the correct one. This will help other users looking for solutions. Commented Jul 17, 2014 at 19:55

1 Answer 1

2

SOLUTION

$route = new Zend_Controller_Router_Route_Static ( 'product/ratings/browse', array (
        'controller' => 'ratings',
        'module' => 'product',
        'action' => 'index' 
) );
$front->getRouter ()->addRoute ( 'browse', $route );
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.