[請益] ci 無法route到新增的controller
自己找到解答了,自己耍蠢。
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)
PHP 近期熱門文章
PTT數位生活區 即時熱門文章