[請益] ci 無法route到新增的controller

看板PHP作者 (smile_ting)時間13年前 (2012/08/25 19:51), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
自己找到解答了,自己耍蠢。 sorry, everyboy. i found the solution so stupid i am. i use apache 2 and hava a virtual host with file at path : "/etc/apache2/sites-enabled/ci.XXXX.com" i have to change AllowOverride None to AllowOverride All =========================================== 我已經有設定了 .htacces 並且也有 enable rewrite 模組 我的domain ci.tao2tw.com 我可以不加任何參數在我domain 後面就 access 到 index/entry 但是我無法透過 htpp://ci.tao2tw.com/order/test 就導到order 這個controller 的test function 必須要 http://ci.tao2tw.com/index.php/order/test route.php $route['default_controller'] = "index/entry"; //"order/test"; it works$route['order'] = "order/"; config.php $config['index_page'] = ''; .htaccess RewriteEngine on RewriteCond $1 !^(index\.php|css|flash|images|img|includes|js|language|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L] 圖文版 http://tinyurl.com/8h5xw83 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 119.77.136.156 ※ 編輯: tao2tw 來自: 119.77.136.156 (08/25 19:51) ※ 編輯: tao2tw 來自: 119.77.136.156 (08/25 22:28)
文章代碼(AID): #1GEBnHwi (PHP)
文章代碼(AID): #1GEBnHwi (PHP)