php_flag magic_quotes_gpc 0
php_flag magic_quotes_runtime 0
php_flag magic_quotes_sybase 0
php_value register_globals 0
php_value output_buffering 1
php_value session.use_trans_sid 0
php_value session.cookie_lifetime 0
php_value zlib.output_compression 4096
php_value zlib.output_compression_level 5
php_value arg_separator.output "&amp;"
php_value date.timezone "Europe/Kiev"

DirectoryIndex index.php
AddDefaultCharset UTF-8
Options -Indexes

<Files ~ ".tpl">
	order allow,deny
	deny from all
</Files>

RewriteEngine on

RewriteRule ^query/(.*)/([0-9]+)/?$ index.php?action=query&query=$1&mode=$2 [L,QSA]

RewriteRule ^albums/([0-9]*)/?$ index.php?action=albums&id=$1[L,QSA]
RewriteRule ^album/([0-9]*)/(\d+)/?$ index.php?action=album&id=$1&album_id=$2 [L,QSA]
RewriteRule ^album/([0-9]*)/(\d+)/(\d+)/?$ index.php?action=album&id=$1&album_id=$2&page=$3 [L,QSA]

RewriteRule ^audio/([0-9]*)$ index.php?action=audio&id=$1[L,QSA]
RewriteRule ^audio/([0-9]*)/$ index.php?action=audio&id=$1 [L,QSA]
RewriteRule ^audio/([0-9]*)/([0-9]*)$ index.php?action=audio&id=$1&page=$2 [L,QSA]
RewriteRule ^audio/([0-9]*)/([0-9]*)/$ index.php?action=audio&id=$1&page=$2 [L,QSA]

RewriteRule ^artists/([0-9]*)/?$ index.php?action=artists&id=$1[L,QSA]
RewriteRule ^artists/([0-9]*)/([0-9]*)/?$ index.php?action=artists&id=$1&page=$2 [L,QSA]
RewriteRule ^artist/([\-0-9]*)_([0-9]*)/?$ index.php?action=artist&artist_id=$1&id=$2 [L,QSA]
RewriteRule ^artist/([\-0-9]*)_([0-9]*)/(\d+)/?$ index.php?action=artist&artist_id=$1&id=$2&page=$3 [L,QSA]

RewriteRule ^lyrics/([\-0-9]*)_([0-9]*)/([0-9]*)$ index.php?action=lyrics&owner_id=$1&id=$2&sid=$3 [L,QSA]
RewriteRule ^lyrics/([\-0-9]*)_([0-9]*)/([0-9]*)/([0-9]*)$ index.php?action=lyrics&owner_id=$1&id=$2&sid=$3&page=$4 [L,QSA]

RewriteRule ^song/([\-0-9]*)_([0-9]*)$ index.php?action=song&owner_id=$1&id=$2 [L,QSA]
RewriteRule ^song/([\-0-9]*)_([0-9]*)/([0-9]*)(_\d+)?$ index.php?action=song&owner_id=$1&id=$2&sid=$3&qad=$4 [L,QSA]

#RewriteRule ^play/([\-0-9]*)_([0-9]*).mp3$ index.php?action=play&owner_id=$1&id=$2 [L,QSA]
RewriteRule ^play/([\-0-9]*)_([0-9]*)/([0-9]*)(_\d+)?.mp3$ index.php?action=play&owner_id=$1&id=$2&sid=$3&qad=$4 [L,QSA]

RewriteRule ^download/([0-9]*)$ index.php?action=download&id=$1 [L,QSA]
RewriteRule ^download_convert/([0-9]*)$ index.php?action=download_convert&id=$1 [L,QSA]

RewriteRule ^history/$ index.php?action=history [L,QSA]
RewriteRule ^history/([0-9]*)$ index.php?action=history&page=$1 [L,QSA]

RewriteRule ^comments/?$ index.php?action=comments [L,QSA]
RewriteRule ^comments/([0-9]*)$ index.php?action=comments&page=$1 [L,QSA]

RewriteRule ^loading/$ index.php?action=loading [L,QSA]
RewriteRule ^loading/([0-9]+)$ index.php?action=loading&page=$1 [L,QSA]

RewriteRule ^error$ index.php?error [L,QSA]
RewriteRule ^convert/([0-9]+)$ index.php?action=convert&id=$1 [L,QSA]

RewriteRule ^picture/([0-9]*)_([0-9]*)$ index.php?action=picture&id=$1&sid=$2 [L,QSA]

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/mp4 .mp4
AddType video/3gpp .3gp