Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a MIME type to .htaccess?

I would like to add the following MIME type to a site run by Apache:

<mime-mapping>
  <extension>jnlp</extension>
  <mime-type>application/x-java-jnlp-file</mime-type>
</mime-mapping>

That is the Tomcat format.

I'm on a shared host, so I can only create an .htaccess file. Would someone please specify the complete contents of such a file?

like image 620
Frank Krueger Avatar asked Aug 29 '08 01:08

Frank Krueger


2 Answers

AddType application/x-java-jnlp-file .jnlp

Note that you might not actually be allowed to do that.

See also the documentation of the AddType directive and the .htaccess howto.

like image 109
Jörg W Mittag Avatar answered Sep 23 '22 21:09

Jörg W Mittag


You should be able to just add this line:

AddType application/x-java-jnlp-file     .jnlp
like image 42
Ryan Guest Avatar answered Sep 22 '22 21:09

Ryan Guest