0

我在 cakephp 中有一个网络应用程序

我有 2 条路线

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

(这条路线有效,当我转到本地主机时,我看到了正确的页面)

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。但是怎么解决。。

4

0 回答 0