# deactivate directory listing
Options -Indexes +FollowSymLinks

# activate mod_rewrite
RewriteEngine on

# prevent direct access to the volumes
RewriteRule ^[^/]+/volumes/data/.cs/mam/cache - [L]
RewriteRule ^[^/]+/volumes/ - [F]

# prevent access to template files
RewriteRule \.(cst|csi)$ - [F]

RewriteRule .svn - [F]

RewriteRule .(css|js|gif|jpg|png|swf|htm|pdf|txt|ico|jar|class|properties|rss|zip|ttf|ai|svg|woff) - [L,NC]

#####    allowed start points in the project      #######
RewriteRule index.php|portal.php - [L]

#####   deny access to the rest   #######

# prevent access to all files exluding the white list above
RewriteRule .+ - [F]

#####    prevent accessing all CSSecurity related files from direct access via http      #######
<FilesMatch "CSSecurity.*">
  Order Deny,Allow
  Deny from All
</FilesMatch>