Home >Backend Development >PHP Tutorial >CI框架删除index.php问题,求解惑

CI框架删除index.php问题,求解惑

WBOY
WBOYOriginal
2016-06-23 14:14:08828browse

当前项目放在根目录下建立.htaccess文件
RewriteRule ^(.*)$ /index.php/$1 [L]
这个路径可以去掉index.php
但是我放在2级目录下CI文件下
RewriteRule ^(.*)$ /index.php/$1 [L]
改为
RewriteRule ^(.*)$ /CI/index.php/$1 [L]
但是找不到文件目录了
怎么解?


回复讨论(解决方案)

.htaccess文件在 CI 目录下?

对,我都放到CI文件夹下了。

补充下问题,我CI框架和项目都放到2级目录下.htaccess文件重定向不起作用,后来我又把CI框架放到根目录下也不行,但是我复制一份2级目录下.htaccess文件放到根目录下就可以了,实在不清楚原因,如果我再起个项目同时调用根目录下的CI框架不就出问题了。。。。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn