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