2010-11-18 06:08:12 +01:00
|
|
|
#
|
|
|
|
# Whitelist appropriate assets files.
|
2016-02-26 02:05:55 +01:00
|
|
|
# This file is automatically generated via File.allowed_extensions configuration
|
|
|
|
# See AssetAdapter::renderTemplate() for reference.
|
2010-11-18 06:08:12 +01:00
|
|
|
#
|
|
|
|
|
2016-02-26 02:05:55 +01:00
|
|
|
<IfModule mod_rewrite.c>
|
|
|
|
SetEnv HTTP_MOD_REWRITE On
|
|
|
|
RewriteEngine On
|
|
|
|
|
|
|
|
# Disable PHP handler
|
|
|
|
RewriteCond %{REQUEST_URI} .(?i:php|phtml|php3|php4|php5|inc)$
|
|
|
|
RewriteRule .* - [F]
|
|
|
|
|
|
|
|
# Allow error pages
|
|
|
|
RewriteCond %{REQUEST_FILENAME} -f
|
|
|
|
RewriteRule error[^\/]*.html$ - [L]
|
|
|
|
|
|
|
|
# Block invalid file extensions
|
|
|
|
RewriteCond %{REQUEST_URI} !.(?i:ace|arc|arj|asf|au|avi|bmp|bz2|cab|cda|css|csv|dmg|doc|docx|dotx|dotm|flv|gif|gpx|gz|hqx|ico|jar|jpeg|jpg|js|kml|m4a|m4v|mid|midi|mkv|mov|mp3|mp4|mpa|mpeg|mpg|ogg|ogv|pages|pcx|pdf|png|pps|ppt|pptx|potx|potm|ra|ram|rm|rtf|sit|sitx|tar|tgz|tif|tiff|txt|wav|webm|wma|wmv|xls|xlsx|xltx|xltm|zip|zipx)$
|
|
|
|
RewriteRule .* - [F]
|
2010-11-18 06:08:12 +01:00
|
|
|
|
2016-02-26 02:05:55 +01:00
|
|
|
# Non existant files passed to requesthandler
|
|
|
|
RewriteCond %{REQUEST_URI} ^(.*)$
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteRule .* ../framework/main.php?url=%1 [QSA]
|
2010-11-18 06:08:12 +01:00
|
|
|
</IfModule>
|