Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

We have some .mht files which load fine from local files but when loaded from the remote webserver display as junk text.

What can I do to make them work correctly from our webserver?

share|improve this question
    
What server do you use to serve the files? Apache, nginx, ... ? –  DKOATED May 17 '13 at 15:42
    
Server is a Parallels Plesk VPS which I believe is CentOS 5.2 which is running Apache. –  NickC May 18 '13 at 22:09
add comment

1 Answer

You probably have to enter this in your root's .htaccess file:

<IfModule mod_mime.c>
# MIME HyperText Markup Language (MHTML) markup
AddType text/html .mhtml .mht .maff .maf
AddType message/rfc822 .mhtml .mht
AddType multipart/related .mhtml .mht .maff .maf
</IfModule>

Comment out lines with # for those you don't need. Good luck.

share|improve this answer
    
At the moment I have added just: 'AddType message/rfc822 mht' to the Appache httpd.conf. This seems to partly work. –  NickC May 21 '13 at 16:19
    
define "partly" ;) –  DKOATED May 21 '13 at 16:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.