0

soon after PHP5.5 -> 5.6 migration i've noticed these warnings in Chrome console:

Resource interpreted as Stylesheet but transferred with MIME type text/html: "https://www.example.com/wp-content/themes/rowling/style.css?ver=4.7.3".

These warnings blocks loading of css, and page becomes spoiled.

I've also noticed that removing <!DOCTYPE html> declaration from page solves the problem. But what it is all about? Why it's happening?


The problem exists with all files (not only css), all .jpg, .mp4 everything comes with response as Content-Type: text/html

robot@iMac:~$ curl -I https://www.example.com/image.jpg HTTP/1.1 200 OK Date: Thu, 26 Oct 2017 09:17:12 GMT Server: Apache/2.4.29 (Ubuntu) Content-Type: text/html; charset=UTF-8

p.s.

Apache modules: mod_mime and mod_mime_magic are active.

Sid
  • 4,302
  • 3
  • 26
  • 27
  • Possible duplicate of [Stylesheet transferred with MIME type text/html](https://stackoverflow.com/questions/15969148/stylesheet-transferred-with-mime-type-text-html) – akond Oct 25 '17 at 16:44

1 Answers1

0

Ok found and solved the problem!

in /etc/apache2/apache2.conf i've found this line SetHandler application/x-httpd-php

after removing it problem was gone.

All responses works now as should! Mime types are ok.

Sid
  • 4,302
  • 3
  • 26
  • 27