WordPress renders text/html files as image/html
-
I upload standard html files containing race results from a sailboat race scoring package. These have always displayed fine from any browser. Just this past week a user contacted me to say that they are now displaying in “code”. I took a look and the files are displaying the html code in IE. Safari and Firefox won’t load the files.
I copied the link to W3C to validate the code. It returned and error saying it couldn’t validate the code as it is being returned as type image/html, not text/html.
If I copy the file out of WordPress and load it into any browser it displays fine. I contacted my provider and he spent several hours confirming what I was seeing. The following is his latest email to me:
————
I checked this setting yesterday and again this morning at all directory levels and it is set to “text/html” everywhere. I have even gone so far as to specify the <mimeMap fileExtension=”.htm” mimeType=”text/htm” /> in every subdirectory leading to this page, https://sailfleet.byc.org/files/2010/06/Dinghy-Series-2-Wave-Rider-2010_Laser_Overall2.htm.It still comes back with a response header of image/htm at the browser level.
There is not a spot in the server settings that is telling the pages to respond as image/htm.
I even went as far as rebooting the server last night. Have you cleared any caching on the site?
I have also copied \wp-content\blogs.dir\5\files to a new directory. I then renamed \wp-content\blogs.dir\5\files to \wp-content\blogs.dir\5\files.old and the new directory to \wp-content\blogs.dir\5\files. Now https://sailfleet.byc.org//wp-content/blogs.dir/5/files.old/2013/08/Hot-August-Nights-Series-2013_PHRF-TOT_Overall2.htm works fine, but https://sailfleet.byc.org//wp-content/blogs.dir/5/files/2013/08/Hot-August-Nights-Series-2013_PHRF-TOT_Overall2.htm still does not.
This tells me something is controlling what happens in the directory named /files. Nothing in IIS is set up for that directory.
There are over 30 other WordPress sites on this server and none of them have this issue. At this point I do not know what else to tell you.
I am more than willing to try something if you find any possible solutions but I do not have any other solutions at this time.
————-Here is the url to the site and a url to one of the htm files. All of the htm files I have check result in the same problem regardless of their source blog directory structure.
Site Page:
https://sailfleet.byc.org/category/race-results-2/series-results/wednesday-racing/I don’t know at this point what caused the problem or how to fix it.
Any help would be appreciated.
- The topic ‘WordPress renders text/html files as image/html’ is closed to new replies.