myskl 发表于 2011-3-31 13:23:56

为什么用了.htaccess,却导致其他文件访问失败?

RewriteEngine on   
RewriteCond $1 !^(index\.php|robots\.txt)   
RewriteRule ^(.*)$ /ci/index.php/$1


用了以后导致css和图片文件不能访问了,
http://localhost/ci/css/style.css

jeongee 发表于 2011-3-31 13:50:05

RewriteCond $1 !^(index.php|robots.txt)   
这里要排除 你的资源文件的目录,比如目录为css
那就写RewriteCond $1 !^(index.php|robots.txt|css)
页: [1]
查看完整版本: 为什么用了.htaccess,却导致其他文件访问失败?