[請益]CodeIgniter 開啟mod_rewrite失敗

作者: arthas1107 (az)   2016-07-15 18:14:36
已爬文但仍然無法解決,只好再發一篇請大家幫忙
環境
Win10
apache 2.4.20 x86
php 5.6.22 x86
CI2.1.2
架構
WWW
/test
/index.php、.htaccess、system、application...
修改項目
apache-httpd.conf
155行
LoadModule rewrite_module modules/mod_rewrite.so 刪除註解
226行
<Directory />
AllowOverride All
Require all denied
</Directory>
244行
<Directory "d:/www">
Options MultiViews
AllowOverride All
Require all granted
</Directory>
ci-conf
$config['index_page'] = '';
.htaccess內容
RewriteEngine On
RewriteBase /test
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
網路上查到的做法大都試過了,但是仍出現錯誤訊息
Forbidden
You don't have permission to access /test/index.php on this server.
麻煩大家看一下我有哪邊做錯了,感謝
作者: MOONRAKER (㊣牛鶴鰻毛人)   2016-07-15 21:06:00
如果你確定找到的方法都做了 檢查.htaccess的換行字元不可以CRLF 要轉成LF
作者: ns1234 (FAR)   2016-07-15 21:10:00
W10..真酷照錯誤訊息看是 是權限問題 apache 不能訪問 test資料夾?根目錄下的index.php 能開嗎不負責任猜測是少了一個 "." ,變成導到硬碟的"/test/index應該是要導到 /var/www/html/test/index.php 之類的查了一下我的猜測應該是錯的 別理我..另外想問一下 CI有3 不直接 從3開始嗎XD
作者: AkiHito (AkiHito)   2016-07-16 07:11:00
這是用sub folder的?

Links booklink

Contact Us: admin [ a t ] ucptt.com