# fix ETags
FileETag MTime Size

# caching
<IfModule mod_expires.c>
	ExpiresActive On
	<FilesMatch "\.(ico|gif|jpe?g|png|svg|svgz|js|css|swf|ttf|otf|woff|eot)$">
		ExpiresDefault "access plus 1 month" 
	</FilesMatch>
</IfModule>

# gzip
<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml text/javascript text/css application/x-javascript application/xhtml+xml application/javascript

	# these browsers do not support deflate
	BrowserMatch ^Mozilla/4 gzip-only-text/html 
	BrowserMatch ^Mozilla/4.0[678] no-gzip
	BrowserMatch bMSIE !no-gzip !gzip-only-text/html

	SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force
</IfModule>

# options 
Options -Indexes
Options +FollowSymlinks

# nice urls
RewriteEngine On
RewriteBase /

# backend is an existing folder, but it should be handled as all urls
RewriteCond %{REQUEST_URI} ^/backend/$
RewriteRule . index.php [NC,L]

# handle urls
RewriteCond %{REQUEST_URI} !^$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [NC,L]