[请益]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