########################################################################################################
#   .htaccess?     ,      , 
#   .  ,       ()  -. 
#    : IIS  Apache.    , -   . 
# ,  ,     (    ,     ) 
#        ,       
#  . ,      ,     
#   .     -.htaccess     - . ""  ,  
#     -   ,      .      
#     httpd.conf (          
#         ).  ,      
#     (   ),     .     
# -  .  .htaccess     ,    
#    ,   ,    .htaccess (    "" 
#    .htaccess).    .htaccess       
#   ,      ,           
#        ,       , 
#                
#       jino-net.ru, h2m.ru      
#     
##############################################################################################################

Addtype application/vnd.sonyericsson.mms-template tpl
Addtype application/vnd.wap.wmlc .wmlc
Addtype application/vnd.wap.wmlscriptc .wmlsc
Addtype application/vnd.eri.thm .thm 
Addtype application/vnd.mophun.application .mpn  
Addtype application/vnd.mophun.certificate .mpc
Addtype application/x-gtar .gtar
Addtype application/x-tar .tar
Addtype application/zip .zip
Addtype application/x-rar-compressed .rar
Addtype application/vnd.wap.mms-message .mms
Addtype application/smil .smil
Addtype application/smil .smi
Addtype application/java-archive .jar
Addtype application/vnd.symbian.install .sis
Addtype application/vnd.smaf .mmf
Addtype application/x-tar .hid
Addtype text/vnd.wap.wml;charset=utf-8 .wml
Addtype text/vnd.wap.wmlscript .wmls
Addtype text/x-vmel .mel
Addtype text/vnd.sun.j2me.app-descriptor;charset=UTF-8 .jad
Addtype text/x-vmel .emy
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 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 image/vnd.wap.wbmp .wbmp
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    
################################################################################################################

#php_flag error_reporting 7
php_flag register_globals 0
php_flag session.use_trans_sid 1
php_flag safe_mode_gid 1
php_flag safe_mode On
php_flag safe_mode_include_dir 1
php_flag magic_quotes_gpc 0
php_flag magic_quotes_runtime 0
php_flag magic_quotes_sybase 0
php_flag file_uploads 1
DirectoryIndex index.php
AddDefaultCharset UTF-8
Options -Indexes

#############################################
#      #
#############################################

ErrorDocument 403 /pages/error.php?error=403
ErrorDocument 404 /pages/error.php?error=404

##########################################
#   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} (\<|%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]
