RewriteEngine On
RewriteRule ^files/([^/]*)/([^/]*)?$ /download.php?uid=$1 [L]
RewriteRule ^download/([^/]*)/?$ /download.php?uid=$1 [L]
RewriteRule ^redirect/([^/]*)/?([^/]*)/?$ /redirect.php?uid=$1&hostid=$2 [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>