Kunnskapsbase

How to add your own MIME types for various file extensions through .htaccess

Surftown's servers are configured with MIME types for the most common file extensions. In some cases, however, you may be required to change the MIME type to something else, or to add a MIME type for a previously un-used file extension.

This guide will show you how to add a MIME type for a file extension though your domain's .htaccess file. Please note, that this guide only applies to our PHP hosting accounts. If you have a ASP.NET hosting account, then additional MIME types need to be added through web.config instead. A guide for this will be added soon.

In order to modify the .htaccess file, you first need to open it for editing, or to create a new file if you don't have one already. See this guide for more information about how to do that.

Adding a MIME type through .htaccess

The following example assumes you want to add the MIME type application/example to the file extension .example. You need to modify it in order to fit your needs.

AddType application/example example 

The change will be applied instantly, as soon as the file has been saved. If you add a MIME type for an extension that has been pre-configured on the server, your MIME-type will override the default.

Kontakt
Should you not find what you are looking for then feel free to ask our support

Create A Ticket
Service Desk
Står du med en større udfordring, som kræver lidt mere ekspertise og tid end du har til rådighed?

Surftown Service Desk, er en service hvor vi foretager arbejdet for dig. Vores Service desk klarer opgaven for dig.

Gør det for mig