0
我正在使用cakephp 2.6.7。我想像WordPress一样重写url。例如,我有一个像这样的网址:http://jegeachi.com/resellers/login。我想看到这个网址为http://jegeachi.com/resellers-login。我研究了很多,发现了一些提示作为路由。即:改变的config/routes.php文件作为如何使我的url像我的cakephp web应用程序中的wordpress一样?
Router::connect('/*', array('controller' => 'resellers', 'action' => 'login'));
但我有很多的控制器和每个控制器需要这样的配置。即:如果我想将url http://jegeachi.com/customers/login更改为http://jegeachi.com/customers-login。我需要改变的config/routes.php文件作为
Router::connect('/*', array('controller' => 'customers', 'action' => 'login'));
有什么想法产生于CakePHP的每个控制器,例如URL。