AddDefaultCharset UTF-8

# INDEX
DirectoryIndex index.php
Options -Indexes

# Кэширование файлов
FileETag MTime Size 
<ifmodule mod_expires.c> 
<filesmatch ".(jpg|gif|png|css|js)$"> 
ExpiresActive on 
ExpiresDefault "access plus 1 year" 
</filesmatch> 
</ifmodule>

# Мод Rewrite
RewriteEngine On
RewriteRule ^([0-9]+)/$ /view.php?id=$1 [L,QSA]
RewriteRule ^download/([0-9]+)/$ /download.php?id=$1 [L,QSA]
RewriteRule ^upload/$ /upload.php [L,QSA]
RewriteRule ^catalog/$ /catalog.php [L,QSA]
RewriteRule ^catalog/([0-9]+)$ /catalog.php?page=$1 [L,QSA]
RewriteRule ^about/$ /info.php?page=about [L,QSA]
RewriteRule ^extension/$ /info.php?page=extension [L,QSA]
RewriteRule ^contactus/$ /info.php?page=contactus [L,QSA]

# Ошибки
ErrorDocument 400 /error[400]
ErrorDocument 401 /error[401]
ErrorDocument 402 /error[402]
ErrorDocument 403 /error[403]
ErrorDocument 404 /error[404]
ErrorDocument 500 /error[500]
ErrorDocument 502 /error[502]

# Компрессия
php_flag zlib.output_compression On
php_value zlib.output_compression_level 6

# Отладка
php_value date.timezone "Europe/Moscow"
php_value arg_separator.output "&amp;"
php_flag register_globals Off
php_flag register_long_arrays Off
php_flag display_errors Off
php_value output_buffering On

# Магические ковычки
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
php_flag magic_quotes_sybase Off

# Задаем соответствие mime типов расширению
Addtype application/zip .zip
Addtype application/x-rar-compressed .rar
AddType application/vnd.sonyericsson.mms-template tpl
AddType application/vnd.eri.thm .thm 
AddType application/vnd.mophun.application .mpn 
AddType application/vnd.mophun.certificate .mpc
AddType application/vnd.smaf .mmf
AddType application/x-tar .hid
Addtype application/smil .smil 
Addtype application/smil .smi 
Addtype application/java-archive .jar 
Addtype application/vnd.symbian.install .sis
Addtype application/vnd.wap.mms-message .mms
Addtype application/octet-stream .exe

Addtype text/x-imelody .imy 
Addtype text/x-emelody .emy 
Addtype text/x-vcard .vcf 
Addtype text/x-vcalendar .vcs 
Addtype text/calendar .ics
AddType text/vnd.sun.j2me.app-descriptor;charset=UTF-8 .jad
addtype text/x-vmel .mel
addtype text/x-vmel .emy

addtype audio/imelody .imy
AddType audio/amr .amr
AddType audio/x-wav .wav
Addtype audio/wav .wav 
Addtype audio/midi .midi 
Addtype audio/midi .mid 
Addtype audio/rmf .rmf

Addtype image/jpeg .jpg 
Addtype image/jpeg .jpeg 
Addtype image/gif .gif 
Addtype image/png .png 
Addtype image/bmp .bmp 

AddType video/mp4 .mp4
Addtype video/3gpp .3gp