【发布时间】:2010-09-06 04:50:14
【问题描述】:
我想在我的网站中启用这种路由,用户可以在其中创建他们的虚 URL
test.com/[user-url]
但也不想破坏我现有控制器的路由 test.com/users test.com/business test.com/admin
所以我将它添加到我的 routes.php 中
Router::connect('/*', array('controller' => 'business', 'action' => 'view'));
是否可以对“/*”使用正则表达式,以便我可以排除控制器的路由?
附言很像 facebook 中的路由
【问题讨论】:
-
你的问题可以通过这个帖子来回答:stackoverflow.com/questions/3646170/…
标签: php regex cakephp cakephp-1.3