DirectoryIndex index.php index.html

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)  index.php [L]

##########################
####### MIME-TYPES #######
##########################
AddType text/x-vcard .vcf

##########################
########## GZIP ##########
## (legacy, Apache 1.3) ##
##########################
<IfModule mod_gzip.c>
	mod_gzip_on Yes
	mod_gzip_dechunk Yes
	mod_gzip_item_include file \.(html?|xml|txt|css|js)$
	mod_gzip_item_include handler ^cgi-script$
	mod_gzip_item_include mime ^text/.*
	mod_gzip_item_include mime ^application/x-javascript.*
	mod_gzip_item_exclude mime ^image/.*
	mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>

##########################
######### DEFLATE ########
##########################
<IfModule mod_deflate.c>
	# Set compression for: html,txt,xml,js,css
	AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript application/javascript
	# Deactivate compression for buggy browsers
	BrowserMatch ^Mozilla/4 gzip-only-text/html
	BrowserMatch ^Mozilla/4.0[678] no-gzip
	BrowserMatch bMSIE !no-gzip !gzip-only-text/html
	# Set header information for proxies
	Header append Vary User-Agent
</IfModule>

##########################
####### EXPIRATION #######
##########################
<IfModule mod_expires.c>
	# Enable expirations
	ExpiresActive On 
	
	# Default directive
	ExpiresDefault "access plus 1 month"
</IfModule>

##########################
##### AUTHENTICATION #####
##########################
<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
 </IfModule>