Cakephp从url中删除插件和控制器名称以执行任何操作

时间:2015-04-24 09:59:30

标签: cakephp routing

我想删除交易控制器的所有操作的交易/交易:

http://example.com/deal/deals/voucher/dsfsdfdf应为http://example.com/voucher/cPH5aGr1

1 个答案:

答案 0 :(得分:0)

您应该在app / config / routes.php

中定义路线
Router::connect('/voucher/*', array('controller' => 'Deals', 'action' => 'voucher', 'plugin' => 'Deal'));