#Uncomment lines below and change the values to upload N mb files to your host
#php_value upload_max_filesize 10M
#php_value memory_limit 55M
#php_value post_max_size 15M
#php_value max_execution_time 300

RewriteEngine on
##point to installation directory
##if it is the root dir,enter /
##else /otherdir
RewriteBase  /

RewriteCond %{QUERY_STRING} ^d=([a-zA-Z0-9]{8,12})$
RewriteRule ^$ download.php?id=%1

RewriteCond %{QUERY_STRING} ^d=([a-zA-Z0-9]{12,16})$
RewriteRule ^$ delete.php?id=%1

RewriteRule   ^file/([0-9]+)/(.*)$ download.php?id=$1&type=2 [L]
RewriteRule   ^([a-z]{2})/file/([0-9]+)/(.*)$ download.php?setlang=$1&id=$2&type=2 [QSA,L]
RewriteRule   ^folders/([0-9]+)/(.*)$ folders.php?fid=$1&%{QUERY_STRING} [L]
RewriteRule   ^([a-z]{2})/folders/([0-9]+)/(.*)$ folders.php?setlang=$1&fid=$2&%{QUERY_STRING} [QSA,L]

RewriteRule   ^([a-z]{2})/top/([0-9]+)\.html$ top.php?setlang=$1&s=$2&type=1 [L]
RewriteRule   ^top/([0-9]+)\.html$ top.php?s=$1&type=1 [L]

RewriteRule ^([a-z]{2})$ ?setlang=$1 [QSA,L]
RewriteRule ^([a-z]{2})/$ ?setlang=$1 [QSA,L]
RewriteRule ^([a-z]{2})/(.*)\.php$ $2.php?setlang=$1 [QSA,L]

<IfModule mod_security.c>
  # Turn off mod_security filtering.
  SecFilterEngine Off

  # The below probably isn't needed,
  # but better safe than sorry.
  SecFilterScanPOST Off
</IfModule>

