Zend_Controller_Router_Route问题
我需要修剪网址的第一部分
示例 /param1/12234/module/controller/action
会变成 /module/controller/action/param1/12234
我尝试过
$router->addRoute('appid', new Zend_Controller_Router_Route('appid/:appid/:模块/:控制器/:action/', array(), array(2=>“模块”, 3=>“控制器”, 4=>“动作”)));
但行不通!
有帮助吗?
I need to trim the first part of my url
Example /param1/12234/module/controller/action
would become /module/controller/action/param1/12234
I tried with
$router->addRoute('appid', new
Zend_Controller_Router_Route('appid/:appid/:module/:controller/:action/',
array(), array(2=> "module", 3=> "controller", 4=> "action")));
but won't works!
some helps?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试:
当然,您需要替换一些东西(模块、控制器、操作和参数)。如果您不使用模块,只需将其从数组中删除即可。
最后,要在视图中使用路由,您可以使用:
更新:
您可以在您的中尝试以下操作
如果您不需要使用永久 301 重定向,则可以删除 R
Try:
Of'course, you'll need to substitute a few things (module, controller, action and parameters). If you're not using modules, simply delete it from the array.
Finally, to use the route in the view, you can use:
UPDATE:
You can try the following in your
If you don't need to use a permanent 301 redirect, you can drop the R