我有一个Apache安装,它始终将.js文件作为text/plain
返回。
我已停用 mod_negotioation ,并检查了/etc/mime.types
中的MIME设置。我知道这是正确的文件,因为我添加了application/font-woff
,它正在按预期工作。
我已停用 mod_pagespeed ,并将/etc/apache2/magic
重命名为/etc/apache2/magic.disabled
,即使 mod_mime_magic 未启用。
即使将AddType application/javascript .js
添加到.htaccess
,也会产生相同的文字/普通文字。
我还能在哪里强制设置类型?
答案 0 :(得分:0)
AddType application/x-javascript .js
#AddType application/x-ecmascript .js
#AddType application/ecmascript .js
#AddType text/javascript .js
#AddType text/ecmascript .js
一次尝试一个,直到找到匹配为止。
<强>参考强>