Sample .htaccess for correct MIME Header Types

An attempt to create a default skeleton .htaccess file with the very best apache htaccess examples… Updated frequently based on detailed info from the Apache htaccess tutorial.

If you see any room for improvement, or if you can add something than go ahead and comment and I will definately give it a look for possible inclusion.

    # CSS
AddType text/css .css

AddType application/xhtml+xml .xhtml

AddType text/xml .xml

AddType image/svg+xml .svg .svgz
AddEncoding x-gzip .svgz

# Server Side Includes (SSI)
AddType text/html .shtml

# Active Server Pages 
AddType text/html .asp

# Favicons
AddType image/ .ico

# Macromedia
AddType application/x-shockwave-flash .swf
AddType application/x-director .dir .dcr .dxr .fgd
AddType application/x-authorware-map .aam
AddType application/x-authorware-seg .aas
AddType application/x-authorware-bin .aab
AddType image/x-freehand .fh4 .fh5 .fh7 .fhc .fh

# Adobe PDF
AddType application/pdf .pdf

# Real
AddType application/vnd.rn-realmedia .rm
AddType audio/vnd.rn-realaudio .ra .ram
AddType video/vnd.rn-realvideo .rv
AddType audio/x-pn-realaudio-plugin .rpm

# Microsoft multimedia
AddType video/x-ms-asf .asf .asx
AddType audio/x-ms-wma .wma
AddType audio/x-ms-wax .wax
AddType video/x-ms-wmv .wmv
AddType video/x-ms-wvx .wvx
AddType video/x-ms-wm .wm
AddType video/x-ms-wmx .wmx
AddType application/x-ms-wmz .wmz
AddType application/x-ms-wmd .wmd

AddType audio/x-mpegurl .m3u

# Binary Compressed files and archives
AddType application/zip .zip
AddType application/x-gzip .gz
AddType application/x-gtar .gtar
AddType application/x-rar-compressed .rar
AddType application/octet-stream .dmg

# Java
AddType application/x-java-applet .class

# Quicktime movies
AddType video/quicktime .mov .qt

# XBM files
AddType image/x-xbitmap .xbm

# WAV files
AddType audio/x-wav .wav

# Bittorrent
AddType application/x-bittorrent .torrent

One thought on “Sample .htaccess for correct MIME Header Types

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s