0
我试图找到一些答案,但它不适用于我,所以我决定在这里问: 即时通讯新Codeigniter,看完一些教程后,我结束了这个.htaccess码。我的htaccess文件无法加载css
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /myprojectname
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index.php|css|robots.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
IM使用本地主机上的XAMPP,我的问题是,我不能加载我的CSS在我看来
<link rel="stylesheet" href="css/metro-bootstrap.css">
的时候,其实我包括CSS在RewriteCond $1 !^(index.php|css|robots.txt)
根看起来像这样
/
-application
-css
-js
-font
-system
-.htaccess
-index.php
'RewriteCond%{REQUEST_FILENAME}!-f'应该已经确保现有文件不被重写。尝试删除排除index.php,css和robots.txt的行。 – Jerodev 2014-10-30 13:18:51
需要删除'RewriteCond $ 1'行。 – 2014-10-30 13:25:36
事实上,'RewriteCond'根本没有意义... – CBroe 2014-10-30 13:27:17