Richard Richard - 1 month ago 23
HTML Question

CSS, .htaccess, Resource interpreted as Stylesheet but transferred with MIME type text/html

My webpage has problems loading CSS documents, also with different typed of

link
ed documents, such as images. The CSS document is linked like this:
<link rel="stylesheet" type="text/css" href="/master.css">
,

But my
.htaccess
is rewriting it into
index.php?query=master.css&search=Pages


The error I get in the chrome console looks like this:


Resource interpreted as Stylesheet but transferred with MIME type text/html: "/master.css". IconWiki:6


My
.htaccess
file




##############
# .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]

Answer

Use flag T=text/css

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