Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resource interpreted as stylesheet but transferred with MIME type text/html

Tags:

html

css

apache

This is my html:

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv = "Content-Language" content = "en"/>
        <meta http-equiv = "Content-Type" content="text/html; charset=utf-8">
        <link rel="stylesheet" type="text/css" href="/xxx/app/www/style.css">

Now when I load the page, Safari's inspector gives me:

Resource interpreted as stylesheet but transferred with MIME type text/html

I'm working on localhost with MAMP. I'm not sure what to modify to get this to work. I read that this might be a server problem of some kind.

How do I solve it?

like image 442
Shoe Avatar asked May 11 '12 14:05

Shoe


1 Answers

Create an .htaccess file into your root folder (or update the existing one) with this line inside

AddType text/css .css 

this will tell apache to send the right content-type header for .css file

like image 108
Fabrizio Calderan Avatar answered Oct 04 '22 03:10

Fabrizio Calderan