Zend framework2 重定向路径正在使用完整的控制器路径(针对bjyauthorize的重定向)

Zend framework2 重定向路径正在使用完整的控制器路径(针对bjyauthorize的重定向),zend-framework2,router,bjyauthorize,Zend Framework2,Router,Bjyauthorize,我在使用bjyauthorize重定向时遇到问题。我遵循这个链接:并且能够使重定向工作 我面临的问题是重定向正在构建一个具有完整控制器路径的url http://lh/user/login?redirect=/talent/my/Myapp%5CController%5CProfile/index where my route and controller are below: route: talent/my controller: Myapp\Controller\Profile 构建重

我在使用bjyauthorize重定向时遇到问题。我遵循这个链接:并且能够使重定向工作

我面临的问题是重定向正在构建一个具有完整控制器路径的url

http://lh/user/login?redirect=/talent/my/Myapp%5CController%5CProfile/index

where my route and controller are below:
route: talent/my
controller: Myapp\Controller\Profile
构建重定向字符串的代码是(编辑:发布完整的onDispatchError函数):

在这里,我为以下内容添加了var_dump $match->getParams():

$options:

array(1) {
  ["name"]=>
  string(16) "route_my/default"
}
我可以更改参数,使“controller”字段设置为“profile”,以修复此问题。但是,我认为这不是最好的办法

请指教

谢谢


贾斯汀

你能发布你的onDispatchError方法的其余部分吗?嗨,鲁本!我刚刚用我的完整onDispatchEvent编辑了我的帖子。谢谢
array(4) {
  ["__NAMESPACE__"]=>
  string(14) "Myapp\Controller"
  ["controller"]=>
  string(22) "Myapp\Controller\Profile"
  ["action"]=>
  string(5) "index"
  ["__CONTROLLER__"]=>
  string(7) "profile"
}
array(1) {
  ["name"]=>
  string(16) "route_my/default"
}