0

I have saved some snapshots of websites in MHTML format. If I open them from local disk with Google Chrome, Brave or Safari the snapshots get loaded and rendered, graphics gets adjusted based on my resolution and I see the website exactly the way I've saved it. Everything works as expected

I would like to serve those files through an Apache or Nginx webserver: so let's say I visit a URL, one of those snapshot is loaded and served to the user displaying the original page by using the snapshot.

By looking around, I saw that some users are suggesting to add the following snipped to httpd.conf to enable mhtml:

<IfModule mime_module>

    AddType text/html .mhtml .mht .maff .maf
    AddType message/rfc822 .mhtml .mht
    AddType multipart/related .mhtml .mht .maff .maf

</IfModule>

However, when visiting the corresponding page, the mhtml file gets downloaded and not rendered - although I'm using the very same browsers which work when loading the file locally. Am I missing something?

SavioD
  • 11
  • 2
  • When you download a site into MHTML, the paths for resources are local to your desktop. You cannot simply copy those files to a web server unless you hand-modify each resource reference. Apache does not understand the MHTML format. Open your web browser debug/inspect window. Load one of the pages and look at the errors in the Console and Network tabs. If you understand HTML, the errors should make sense. – John Hanley Jul 25 '23 at 13:13

0 Answers0