<ifModule mod_deflate.c>
	AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>
<IfModule mod_gzip.c>
	mod_gzip_on         Yes
	mod_gzip_dechunk    Yes
	mod_gzip_item_include file		\.(html?|txt|css|js|php|pl)$
	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>
<ifModule mod_headers.c>
	#кэшировать html и htm файлы на один день
	<FilesMatch "\.(html|htm)$">
		Header set Cache-Control "max-age=43200"
	</FilesMatch>
	#кэшировать css, javascript и текстовые файлы на одну неделю
	<FilesMatch "\.(js|txt)$">
		Header set Cache-Control "max-age=604800"
	</FilesMatch>
	#кэшировать флэш и изображения на месяц
	<FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png)$">
		Header set Cache-Control "max-age=2592000"
	</FilesMatch>
	#отключить кэширование
	<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
		Header unset Cache-Control
	</FilesMatch>
	RewriteEngine On
</IfModule>
# Bad Rquest
#ErrorDocument 400 /400.html
# Authorization Required
#ErrorDocument 401 /401.html
# Forbidden 
#ErrorDocument 403 /401.html
# Not found
#ErrorDocument 404 /404.html
# Method Not Allowed
#ErrorDocument 405 /405.html
# Request Timed Out
#ErrorDocument 408 /408.html
# Request URI Too Long
#ErrorDocument 414 /414.html
# Internal Server Error
#ErrorDocument 500 /500.html
# Not Implemented
#ErrorDocument 501 /501.html
# Bad Gateway 
#ErrorDocument 502 /502.html
# Service Unavailable 
#ErrorDocument 503 /tr.php
# Gateway Timeout
#ErrorDocument 504 /504.html
