I am using Apache webserver 2.2 with Content Negotiation through Multiviews.
I have:
<Directory /home/develop/web/prodBuild>
Options +MultiViews
AddEncoding x-gzip .gz
</Directory>
This directory contains the gzip files. So if a browser requests the file bla.js, the server will return the file bla.js.gz as the file bla.js doesn't exists.
However, the Content-Type on my Ubuntu server is set to be "application/x-gzip" which is wrong as it's a javascript file, so is has be "application/javascript"
I have this working on my local Windows Apache server, but don't seem to get it working on the remote Ubuntu server. :(... NO idea why...
Who/why is it setting this wrong Content-Type ?
BTW: I don't have this line "AddType application/x-gzip .gz .tgz" somwhere in my config, as then I understand why it goes wrong.
My workaround:
add the following line under the above "AddEncoding":
AddType "" .gz
It will then set an empty string as Content-Type and then it works.. I think that the browser will try to discover the content type itself...
I hope somebody can explain to me why this is not working and why this content type is set ? :(