AddDefaultCharset Off

<IfModule mod_php5.c>
    php_flag magic_quotes_gpc off
    php_flag magic_quotes_runtime off
    php_flag register_globals off
    php_flag display_errors off
    php_value max_input_vars 5000
</IfModule>

<IfModule mod_php7.c>
    php_flag magic_quotes_gpc off
    php_flag magic_quotes_runtime off
    php_flag register_globals off
    php_flag display_errors off
    php_value max_input_vars 5000
</IfModule>

<IfModule mod_dir.c>
    DirectoryIndex index.php index.htm index.html
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine On
    #RewriteBase /

    #RewriteRule modules\/.*?\/(config|controller|model)\/ - [F,L]
    #RewriteRule core\/.* - [F,L]
    
    RewriteRule ^(robots.txt)$ $1 [L]

    RewriteCond %{HTTP:Authorization} ^Basic.*
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?http_authorization=%{HTTP:Authorization} [QSA,L]    
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

#Запрещаем открывать файлы напрямую
<Files ~ "(\.inc\.php|\.tpl|\.tpl\.php|\.auto\.php|\.auto\.xml)$">
    Order allow,deny
    Deny from all
</Files>