I am trying to understand the difference between ForceType and AddType. They both appear to associate a MIME-type with an extension but ForceType's structure seems more robust.
If I don't need this robustness I'd prefer to use a simple tool for a simple job.
I'd like to have my server treat .html.gz files as text/html, but substituting the second block of code for the first in my .htaccess file causes the browser to stop displaying the page and instead downloads it. I appreciate they are two different blocks of code but I'm not understanding the subtleties between them, or if it is possible to modify the simpler second block of code to accomplish the same job as the first.
When placed into an .htaccess file or a <Directory>, or <Location> or <Files> section...
if you want to use ForceType and limit it to one filetype i think you would need to use something like the following instead: <Files ~ "\.html\.gz$"> ForceType text/html </Files>
have you verified that the correct Content-Type header is being sent with the response when configured using the AddType directive for .html.gz files? note that ForceType is a core module directive while AddType is a mod_mime directive. if mod_mime isn't loaded/enabled the directive won't work.