#DirectoryIndex index.php index.html
Options -Indexes
AddDefaultCharset UTF-8
RewriteEngine On

#php_value session.save_path "/home/talki601/domains/myleisure.ru/temp/"
php_value error_log errors.log
php_flag zlib.output_compression 1
php_flag zlib.output_compression_level 3
 
<Files "errors.log">
 order allow,deny
</Files>

<ifModule mod_gzip.c>
 mod_gzip_on Yes
 mod_gzip_dechunk Yes
 mod_gzip_item_include file \.(css|js|php)$
 mod_gzip_item_include handler ^cgi-script$
 mod_gzip_item_include mime ^text/.*
 mod_gzip_item_include mime ^application/x-javascript.*
 mod_gzip_item_include mime ^application/x-httpd-php
 mod_gzip_item_exclude mime ^image/.*
 mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

##Общие параметры ЧПУ
RewriteRule ^go/([0-9]+)$ Counters/go.php?id=$1 [L,QSA]
RewriteRule ^out/([0-9]+)$ Counters/out.php?id=$1 [L,QSA]
RewriteRule ^seo/([0-9]+)$ Counters/seo.php?id=$1 [L,QSA]
RewriteRule ^image/([0-9]+)$ Counters/image.php?id=$1 [L,QSA]
RewriteRule ^imageOther/([0-9]+)$ Counters/imageOther.php?id=$1 [L,QSA]
RewriteRule ^captcha_([0-9]+)$ Sys/functionCaptcha.php [L,QSA]
##Пользовательская часть
RewriteRule ^([a-zA-Z]+)$ ?m=$1 [L,QSA]
RewriteRule ^([a-zA-Z]+)/([0-9]+)$ ?m=$1&page=$2 [L,QSA]
RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+)$ ?m=$1&act=$2 [L,QSA]
RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+)/([0-9]+)$ ?m=$1&act=$2&id=$3 [L,QSA]
RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+)/([0-9]+)/([0-9]+)$ ?m=$1&act=$2&id=$3&page=$4 [L,QSA]
RewriteRule ^stats/days/([0-9]+)/month/([0-9]+)$ ?m=stats&act=days&id=$1&month=$2
RewriteRule ^stats/hours/([0-9]+)/day/([0-9]+)$ ?m=stats&act=hours&id=$1&day=$2
RewriteRule ^platforms/deletePlatform/([0-9]+)/ok$ ?m=platforms&act=deletePlatform&id=$1&ok [L,QSA]
RewriteRule ^users/view/([a-zA-Z]+)$ ?m=users&act=view&login=$1 [L,QSA]
##Панель управления
RewriteRule ^control_Panel/([a-zA-Z]+)$ AdmPanel/?adminm=$1 [L,QSA]
RewriteRule ^control_Panel/([a-zA-Z]+)/([a-zA-Z]+)$ AdmPanel/?adminm=$1&act=$2 [L,QSA]
RewriteRule ^control_Panel/([a-zA-Z]+)/([a-zA-Z]+)/([0-9]+)$ AdmPanel/?adminm=$1&act=$2&id=$3 [L,QSA]
RewriteRule ^control_Panel/([a-zA-Z]+)/([0-9]+)$ AdmPanel/?adminm=$1&page=$2 [L,QSA]
RewriteRule ^control_Panel/ip/searchIp/([a-z]+)/([a-z]+)/([a-zA-Zа-яА-Я0-9]+)/search/([0-9]+)$ AdmPanel/?adminm=ip&act=searchIp&type=$1&sort=$2&text=$3&search&page=$4 [L,QSA]
RewriteRule ^control_Panel/users/deleteUser/([0-9]+)/ok$ AdmPanel/?adminm=users&act=deleteUser&id=$1&ok [L,QSA]
RewriteRule ^control_Panel/platforms/deleteSait/([0-9]+)/ok$ AdmPanel/?adminm=platforms&act=deleteSait&id=$1&ok [L,QSA]
##Страницы ошибок
ErrorDocument 403 /?m=error&act=access
ErrorDocument 404 /?m=error&act=empty