用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2698|回复: 1
收起左侧

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

[复制链接]
发表于 2011-3-31 13:23:56 | 显示全部楼层 |阅读模式
  1. RewriteEngine on   
  2. RewriteCond $1 !^(index\.php|robots\.txt)   
  3. RewriteRule ^(.*)$ /ci/index.php/$1 [L]
复制代码



用了以后导致css和图片文件不能访问了,
http://localhost/ci/css/style.css
发表于 2011-3-31 13:50:05 | 显示全部楼层
RewriteCond $1 !^(index.php|robots.txt)   
这里要排除 你的资源文件的目录,比如目录为css
那就写RewriteCond $1 !^(index.php|robots.txt|css)

本版积分规则