重定向頁面我有網址: -我想在CakePHP中
http://mydomain/test/index.html
我想,當用戶將URL輸入: - http://mydomain/test
它會重定向到http://mydomain/test/index.html
..
什麼我試過我給路由代碼。
Router::connect('/', array('controller' => 'enrollments', 'action' => 'index'));
我想重定向到index.html頁面如何給..
index.html頁面究竟在哪裏?你把它放在app/webroot/test /中嗎? – JJJ 2012-07-24 12:26:14
不,它只在webroot上。 – 2012-07-24 12:54:43
您無法訪問webroot中的index.html。 index.php優先,你不能刪除它,否則CakePHP停止工作。爲什麼你需要有一個靜態html文件,你不能將它添加爲一個靜態的CakePHP動作並將根重定向到那個? – JJJ 2012-07-24 13:14:02