# 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|rss|zip|ttf|ai|svg|woff) - [L,NC]

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

# The CSV export accesses these files so we have to whiteliste them.
RewriteRule ^modules/customer/php/scripts/automation/export/init.php - [L]
RewriteRule ^modules/customer/php/scripts/automation/export/starter.php - [L]

# redirect to the admin forward.php
RewriteRule ^forward\.php(.*)$ ../admin/forward.php$1 [L,NC]

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