htaccess setting the mimetype for a single file

后端 未结 1 1600
别那么骄傲
别那么骄傲 2021-01-05 01:18

In an .htaccess file one might set the mimetype for a given extension like:

AddType application/javascript .js

How would one set the mimety

相关标签:
1条回答
  • 2021-01-05 01:27

    You can use the <files> container to match the file's name before adding a type for it:

    <Files specialfile.js>
        AddType application/ecmascript .js
    </Files>
    
    0 讨论(0)
提交回复
热议问题