Размер файла: 2.22Kb
- #Задаем кодировку UTF-8
- AddDefaultCharset utf-8
- #Индексная страница
- DirectoryIndex index.html index.php
- Options -Indexes
-
- <IfModule mod_php5.c>
- # Время жизни сессии в секундах
- php_value session.gc_maxlifetime 3600
- # Время жизни куки в секундах
- php_value session.cookie_lifetime 3600
- php_flag display_errors off
- php_flag register_globals Off
- php_flag file_uploads On
- php_flag allow_url_fopen off
- php_flag magic_quotes_gpc On
- php_flag magic_quotes_runtime Off
- php_value upload_max_filesize 600M
- php_value post_max_size 600M
-
-
- #Включает отслеживание сим-ссылок
- Options +FollowSymLinks
- #Запускает url_rewriting
- RewriteEngine On
- #Блокирует все ссылки, содержащие <script>
- RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
- #Блокирует все скрипты, которые пытаются изменить переменные PHP Globals:
- RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
- #Блокирует все скрипты, которые пытаются изменить переменную _REQUEST:
- RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
- #Перенаправляет все подобные попытки на страницу с ошибкой 403 - запрещено
- RewriteRule ^(.*)$ index.php [F,L]
-
- RewriteRule ^modules/forum/section/([0-9]+)/? modules/forum/section.php?id=$1 [L]
-
- <ifModule mod_gzip.c>
- mod_gzip_on Yes
- mod_gzip_dechunk Yes
- mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
- mod_gzip_item_include handler ^cgi-script$
- mod_gzip_item_include mime ^text/.*
- mod_gzip_item_include mime ^application/x-javascript.*
- mod_gzip_item_exclude mime ^image/.*
- mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
- </ifModule>
-
- <IfModule mod_expires.c>
- ExpiresActive On
- ExpiresByType application/javascript "access plus 7 days"
- ExpiresByType text/javascript "access plus 7 days"
- ExpiresByType text/css "access plus 7 days"
- ExpiresByType image/gif "access plus 7 days"
- ExpiresByType image/jpeg "access plus 7 days"
- ExpiresByType image/png "access plus 7 days"
- </IfModule>
- </IfModule>