Mime types issue - mht files

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Mime types issue - mht files

Postby ncstebb » 25. November 2012 02:27

Hi all,

I'm unable to get mht files to display correctly through xampp. I see text such as the following...
MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_01CDCAFC.67E0D690" This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive, such as Windows® Internet Explorer®. ------=_NextPart_01CDCAFC.67E0D690 Content-Location: file:///C:/4CE9C652/Y12-SoftwareDev-Outline-2012.htm Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="us-ascii"

I've been wrestling with this problem for a few days now and I suspect the problem is that I am not applying the mime type settings correctly.

To begin with I'm pretty sure that this should work because if I change the file extensions of my files from .mht to .eml they work just fine. Also if I open a mht file in Internet Explorer without going through the web server it looks fine as well. So basically I should be able to get xampp to treat the .mht files the same as the .eml files... yes?

Here is what I've tried...
  • Code: Select all
    multipart/related mht
    in mime.types
  • Code: Select all
    message/rfc822 mht
    in mime.types
  • Code: Select all
    application/octet-stream mht
    in mime.types
  • Code: Select all
    AddType multipart/related .mht
    in httpd.conf inside <IfModule mime_module>
  • added mht next to the entry for eml in mime.types so it reads
    Code: Select all
    message/rfc822   eml mht mime

Each time I made a change I restarted apache and refreshed the page or restarted the browser, but none of these had any effect on the way the mht file was displayed. Can anybody help?

Thanks in advance,

Nick


Here are my details as requested in the "How to post" sticky...
Xampp version: 1.8.1
Xampp control panel version: 3.1.0
Operating system: Windows 7 (to be deployed in Windows Server 2008)
ncstebb
 
Posts: 2
Joined: 25. November 2012 01:20
XAMPP Version: 5.6.3
Operating System: Windows 7

Re: Mime types issue - mht files

Postby ncstebb » 25. November 2012 20:28

Hi all,

This is working now. I went with the option of listing mht next to eml as below.

Code: Select all
message/rfc822   eml mht mime


Looks like al I had to do was run Xampp Control Panel as administrator to get the change to take effect. Perhaps Apache wasn't restarting properly without this?

Many thanks,

Nick
ncstebb
 
Posts: 2
Joined: 25. November 2012 01:20
XAMPP Version: 5.6.3
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests