File size: 3.82Kb
# так безопаснее
php_value register_globals 0
# убираем экранирование кавычек
php_value magic_quotes_gpc 0
# дописываем сессию к URL
php_value session.use_trans_sid 1
php_value session.cookie_lifetime 0
# кодировка по-умолчанию
AddDefaultCharset UTF-8
DirectoryIndex index.php
Options -Indexes
<Files count.php>
order allow,deny
deny from all
</Files>
# RewriteEngine
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^id([0-9]*) /profille.php?id=$1 [L,QSA]
RewriteRule ^edit /user/edit_anketa.php [L,QSA]
RewriteRule ^exit exitt.php [L,QSA]
RewriteRule ^login log.php [L,QSA]
RewriteRule ^restore restore.php [L,QSA]
RewriteRule ^gifts([0-9]*) /user/us_gift.php?id=$1 [L,QSA]
RewriteRule ^friends /user/us_frend.php [L,QSA]
RewriteRule ^albums([0-9]*) albums/index.php?id=$1 [L,QSA]
RewriteRule ^join registracions.php [L,QSA]
RewriteRule ^groups /club/index.php [L,QSA]
RewriteRule ^group([0-9]*) /club/index.php?act=group&id=$1 [L,QSA]
RewriteRule ^attachments([0-9]*) wall/files.php?id=$1 [L,QSA]
RewriteRule ^attach([0-9]*) user/feed/files.php?id=$1 [L,QSA]
RewriteRule ^wall([0-9]*)_([0-9]*) wall/post.php?id=$1&post=$2 [L,QSA]
RewriteRule ^like([0-9]*)_([0-9]*) wall/like.php?id=$1&post=$2 [L,QSA]
RewriteRule ^published([0-9]*)_([0-9]*) wall/published.php?id=$1&post=$2 [L,QSA]
RewriteRule ^komm([0-9]*)_([0-9]*) wall/like_komm.php?id=$1&post=$2 [L,QSA]
RewriteRule ^audios([0-9]*) wall/audios.php?id=$1 [L,QSA]
RewriteRule ^audio user/audio.php [L,QSA]
RewriteRule ^radio user/radio.php [L,QSA]
RewriteRule ^videos([0-9]*) wall/videos.php?id=$1 [L,QSA]
RewriteRule ^video user/video.php [L,QSA]
RewriteRule ^settings /user/sett/index.php [L,QSA]
RewriteRule ^feed /user/feed/index.php [L,QSA]
RewriteRule ^fave /user/fave/index.php [L,QSA]
RewriteRule ^support /help/index.php [L,QSA]
</IfModule>
# RewriteEngine
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/$
RewriteRule ^([a-z_0-9]*)$ /profille.php?u=$1 [NC]
</IfModule>
# задаем соответствие 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 /err.php?err=400
ErrorDocument 401 /err.php?err=401
ErrorDocument 402 /err.php?err=402
ErrorDocument 403 /err.php?err=403
ErrorDocument 404 /err.php?err=404
ErrorDocument 500 /err.php?err=500
ErrorDocument 502 /err.php?err=502