Zend framework2 如何在zend2中从一个模块重定向到另一个模块

Zend framework2 如何在zend2中从一个模块重定向到另一个模块,zend-framework2,url-redirection,Zend Framework2,Url Redirection,我已经在我的构造函数中这样做了 $acl = new Acl(); $acl->addRole(new Role('guest')) ->addRole(new Role('user')) ->addRole(new Role('admin')); $acl->addResource(new Resource('login')); $acl->addResource(new Resource('forgotpassowrd

我已经在我的构造函数中这样做了

 $acl = new Acl();
    $acl->addRole(new Role('guest'))
    ->addRole(new Role('user'))
    ->addRole(new Role('admin'));

    $acl->addResource(new Resource('login'));
    $acl->addResource(new Resource('forgotpassowrdAction'));

    $acl->deny('user','login');
    $acl->deny('guest', 'login');
    $acl->deny('guest', 'forgotpassowrdAction');
    $access=$acl->isAllowed('guest', 'login') ? "Allowed" : "Denied";
    if($access=='Denied'){
        $res=new Request();
        return $this->redirect()->toRoute("forgotpassowrdAction");
    }
我想重定向到AccessDeniedAction中IndexController.php中的应用程序模块。请告诉我怎么做。 当我使用

Url plugin requires that controller event compose a router; none found
这就是错误所在。
请帮助我,我只想在用户控制器中实现ACL。

ForgotPasswowRDAction在我看来不像索引路由。请检查module.config并重定向到已定义的路由。加上你在构造器中做了这件事意味着什么。哪一个?