如何在cakePHP中配置路由进行故障排除

时间:2012-10-30 20:00:38

标签: cakephp routes

我在cakephp中有一个web应用程序

我有2条路线

Router::connect('/', array('controller' => 'custom', 'action' => 'home'));

(这条路线有效,当我去localhost时,我看到了正确的页面)

Router::connect('/custom/*', array('controller' => 'custom', 'action' => 'actionOnHomePage'));

(此路由不起作用)当我转到localhost / custom / actionOnHomePage时,我收到Page not found错误。 奇怪,因为我有一个

/app/View/Custom/actionOnHomePage - page

我有

CustomController::actionOnHomePage

在apache错误日志中我看到:

[Tue Oct 30 20:53:15 2012] [error] [client 127.0.0.1] File does not exist: /var/www/thundr.it/src/app/webroot/custom, referer: http://localhost/

所以它指的是错误的目录,因为他正在寻找webroot。但是如何解决它..

0 个答案:

没有答案