AddDefaultCharset UTF-8
php_value session.use_trans_sid 1
Options -Indexes

# Обычно подходит для серверов, где запросы обрабатывает Apache
#  RewriteCond %{SERVER_PORT} !^443$
# RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]



RewriteEngine On
RewriteRule ^([0-9]*)$ /core/id.php?id=$1&wall=0 [L,QSA]
RewriteRule ^sid=ank?$ /profile.php [L,QSA]
RewriteRule ^sid=on?$ /core/id.php?id=$1&wall=1 [L,QSA]
RewriteRule ^sid=off?$ /core/id.php?id=$1&wall=0 [L,QSA]
RewriteRule ^error?$ /admin/bugtrag.php [L,QSA]
RewriteRule ^login?$ /core/login.php [L,QSA]

RewriteRule ^index_musimka?$ /index.php [L,QSA]
RewriteRule ^not?$ /not_query.php [L,QSA]
RewriteRule ^ncolor?$ /user/ncolor.php [L,QSA]

RewriteRule ^reg?$ /core/registration.php [L,QSA]
RewriteRule ^star?$ /user/to_start.php [L,QSA]
RewriteRule ^dr?$ /user/dr.php [L,QSA]
RewriteRule ^success?$ /success.php [L,QSA]

# задаем соответствие mime типов расширению
AddType text/vnd.wap.wml;charset=utf-8 .wml
AddType application/vnd.sonyericsson.mms-template tpl
AddType application/vnd.wap.wmlc .wmlc
AddType text/vnd.wap.wmlscript .wmls
AddType application/vnd.wap.wmlscriptc .wmlsc
AddType image/vnd.wap.wbmp .wbmp
AddType application/vnd.eri.thm .thm
AddType application/vnd.mophun.application .mpn
AddType application/vnd.mophun.certificate .mpc
AddType text/vnd.sun.j2me.app-descriptor .jad
Addtype text/x-vmel .mel
Addtype audio/imelody .imy
AddType application/vnd.smaf .mmf
Addtype text/x-vmel .emy
AddType audio/amr .amr
AddType audio/x-wav .wav
AddType application/x-tar .hid
Addtype image/jpeg .jpg
Addtype image/jpeg .jpeg
Addtype image/gif .gif
Addtype image/png .png
Addtype image/bmp .bmp
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 application/smil .smil
Addtype application/smil .smi
Addtype application/java-archive .jar
Addtype application/vnd.symbian.install .sis
Addtype audio/wav .wav
Addtype audio/midi .midi
Addtype audio/midi .mid
Addtype audio/rmf .rmf
Addtype application/vnd.wap.mms-message .mms
AddType video/flv .flv
AddType video/mp4 .mp4
Addtype video/3gpp .3gp
Addtype application/zip .zip
Addtype audio/mpeg .mp3

# переопределяем страницы ошибок
ErrorDocument 400 /core/error/?err=400
ErrorDocument 401 /core/error/?err=401
ErrorDocument 402 /core/error/?err=402
ErrorDocument 403 /core/error/?err=403
ErrorDocument 404 /core/error/?err=404
ErrorDocument 500 /core/error/?err=500
ErrorDocument 502 /core/error/?err=502



















#Ускорение работы сайта за счет кэша
# 1 YEAR
<FilesMatch "\.(ico|pdf|flv)$">
Header set Cache-Control "max-age=29030400, public"
</FilesMatch>
# 1 WEEK
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
# 2 DAYS
<FilesMatch "\.(xml|txt|css|js)$">
Header set Cache-Control "max-age=172800, proxy-revalidate"
</FilesMatch>
# 1 MIN
<FilesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=60, private, proxy-revalidate"
</FilesMatch>


#Блокирует все ссылки, содержащие <script>
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]









