DirectoryIndex index.php
php_value register_globals off
php_flag register_argc_argv Off
php_value date.timezone "Europe/Moscow"
AddDefaultCharset cp1251
RewriteEngine on

# дописываем сессию к URL
php_value session.use_trans_sid 1
php_value session.cookie_lifetime 0

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

RewriteRule ^([0-9]+)/*$ profile.php?id=$1 [QSA,NC]
RewriteRule ^room,([0-9]+)$ chat.php?room=$1 [QSA,NC]

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^(www\.)?sewap\.in$ [NC]
RewriteCond %{HTTP_HOST}---%{REQUEST_URI} ^([^\.]+)\.sewap\.in---/([^/]+)? [NC]
RewriteCond %1---%2 !^(.*)---\1$ [NC]
RewriteRule ^(.*)$ http://sewap.in/!%1$1 [R=301,L]
RewriteRule ^!(.*)$ /profile.php?id=$1


ErrorDocument 404 http://vou-vou.ru/404.php
