########################################################################################################
#   .htaccess?     ,      , 
#   .  ,       ()  -. 
#    : IIS  Apache.    , -   . 
# ,  ,     (    ,     ) 
#        ,       
#  . ,      ,     
#   .     -.htaccess     - . ""  ,  
#     -   ,      .      
#     httpd.conf (          
#         ).  ,      
#     (   ),     .     
# -  .  .htaccess     ,    
#    ,   ,    .htaccess (    "" 
#    .htaccess).    .htaccess       
#   ,      ,           
#        ,       , 
#                
#       jino-net.ru, h2m.ru      
#     
##############################################################################################################
#
#         (##)   ,
#    -          ( 500)
#              
#         ##   
#     3  ###        
#
##############################################################################################################
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;charset=UTF-8 .jad
AddType application/x-gtar .gtar
AddType application/x-tar .tar
AddType application/zip .zip
AddType application/x-rar-compressed .rar
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
#########################################
#           # 
#            #
#########################################
<Files ~ "template|local">
   Order allow,deny
    Deny from all
</Files>
<Files ~ ".(dat|priv|prof)$">
   Order allow,deny
   Deny from all
</Files>
################################################################################################################
#           wap-motor    
################################################################################################################

DirectoryIndex index.php
AddDefaultCharset UTF-8
Options -Indexes
	
##########################################
#  c     #
##########################################
ErrorDocument 400 /pages/error.php?error=400	
ErrorDocument 401 /pages/error.php?error=401
ErrorDocument 402 /pages/error.php?error=402	
ErrorDocument 403 /pages/error.php?error=403
ErrorDocument 404 /pages/error.php?error=404
ErrorDocument 500 /pages/error.php?error=500
ErrorDocument 502 /pages/error.php?error=502	
##########################################
#   mod Rewrite       #
#           #
# index.php?p=dir&f=file , dir/file.mot #
##########################################
RewriteEngine On
##################################################################################################################
#    : 'Options FollowSymLinks'   
#    .       mod_rewrite,   
#           .htaccess   
#      ,    (  #  
#  ),       .   ,
#       , ..     . 
###################################################################################################################
###Options +FollowSymlinks

####################################################################################
#    ,   URL web-
#        .
#     MOTOR ( "/"    )
####################################################################################
###RewriteBase /

#############################
#     mot #
#############################
RewriteRule ^([a-z0-9_-]+)/([a-z0-9_-]+).mot(/?)+$ ?p=$1&f=$2 [QSA,L]

#########################################################################
#        #
#########################################################################                    
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} http:.*\/.*\/ [OR]
RewriteCond %{QUERY_STRING} ..*\/ [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteCond %{REQUEST_METHOD} ^TRACE 
RewriteRule ^(.*)$ index.php [F,L]