Allow From All

php_value register_globals 0
php_value magic_quotes_gpc 0
DirectoryIndex index.php
Options -Indexes

RewriteEngine On

RewriteRule ^templates/(.*)\.(tpl|css|widget|php)$ 404
RewriteRule ^(templates)/(.*)$ $0 [L]

RewriteRule ^.*$ index.php [QSA,L]

ErrorDocument 404 /errors/404.php
ErrorDocument 403 /errors/403.php