想在CI目录中加入一个不需要CI处理的PHP文件来做一些特殊...
想在CI目录中加入一个不需要CI处理的PHP文件来做一些特殊的数据接收工作,但总提示404我有做Rewrite
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\\.php|images|system|robots\\.txt|insert\\.php)
RewriteRule ^(.*)$ ci/index.php/$1
</IfModule>
其中insert.php就是不想要CI处理的文件
这种情况应该如何处理下呀?
insert.php放在项目根目录里面 是在CI目录下,应该就是根目录吧,和index.php在一起,没其他PHP文件了{:1_1:} 不需要rewrite啊,直接访问就OK
用不用CI处理主要看你访问的时候加没加index.php 直接输入URL 楼上两位,我的Rewrite就是省略index.php的处理:L
直接输入URL:
localhost/ci/insert.php
会提示404
输入URL:
localhost/ci/index.php/insert.php更不行了,本来不需要CI处理的 CI是不允许有这种文件存在吗?各位有碰到这种情况么,是怎么处理的?:L 现在还有人在用CI吗?:L RewriteCond $1 !^(index\\.php|images|system|robots\\.txt|insert\\.php)为什么加2个\\呢?
把insert.php放到和index.php同级目录,.htaccess中应该是
RewriteCond $1 !^(index\.php|images|system|robots\.txt|insert\.php)
本人测试是可以的 你再看一下我一楼的内容,和你发的是一样的呀
RewriteCond $1 !^(index\\.php|images|system|robots\\.txt|insert\\.php)
页:
[1]