2016-10-13 1 views
0

내 웹 페이지에 CSS 문서를로드하는 데 문제가 있으며 이미지와 같이 link 개의 다른 문서를 입력하는 데 문제가 있습니다.CSS, .htaccess, 리소스가 스타일 시트로 해석되었지만 MIME 유형이 text/html로 전송 된 경우

, <link rel="stylesheet" type="text/css" href="/master.css">하지만 내 .htaccessindex.php?query=master.css&search=Pages

이처럼 내가 크롬 콘솔에서 얻을 오류 모습으로 다시 작성됩니다 : CSS의 문서는 다음과 같이 연결되어

자원이 스타일 시트로 해석하지만, 전달 MIME 형식은 text/html : "/master.css"입니다. IconWiki : 6

.htaccess 파일


############## 
# .htaccess # 
############## 
Options +FollowSymLinks -MultiViews 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 

RewriteRule "syspag/(.*)$" page.php?p=$1 [QSA] 
RewriteRule "sysico/(.*)$" icon.php?i=$1 [QSA] 

RewriteRule Icons/(.*)$ index.php?query=$1&search=Icons [QSA] 
RewriteRule (.*)$ index.php?query=$1&search=Pages [QSA] 

답변

1

사용 플래그 T = 텍스트/CSS를

RewriteRule (.*)$ index.php?query=$1&search=Pages [QSA,T=text/css] 
+0

문제가되지 않습니다, 당신은 T를 사용할 말했다 하나 = text/css가 잘못되었습니다. 예를 들어/Home,/Search? q = blahblahblah 등으로 이동합니다. –

+0

ex 'RewriteRule CSS/(.*)$ css/$ 1.css [T = text/css]' –

+0

@ 리차드 그러나 CSS로'/ master.css'를 참조한다면 작동하지 않을 것입니다. 질문). – MrWhite

관련 문제