hxily 发表于 2011-4-15 22:56:49

.htaccess 404和去掉index.php不能共存

写了个.htaccess来用去掉Index.php 和定义404.
RewriteEngine On
ErrorDocument 404 /error.php

RewriteCond %{HTTP_HOST} ^test.com$
RewriteRule ^(.*)$ http://www.test.com/$1

RewriteCond $1 !^(index.php|images|robots.txt)   
RewriteRule ^(.*)$ /index.php/$1


就这几行.加上
RewriteCond $1 !^(index.php|images|robots.txt)   
RewriteRule ^(.*)$ /index.php/$1
这两行可以去掉index.php,但不能显示自己的error.php,显示的是CI自己的error_404.php,去掉这两行可以显示error.php但index.php 又去不掉

请问各位大虾,什么原因呢?
页: [1]
查看完整版本: .htaccess 404和去掉index.php不能共存