Просмотр файла .htaccess

Размер файла: 2.22Kb
  1. #Задаем кодировку UTF-8
  2. AddDefaultCharset utf-8
  3. #Индексная страница
  4. DirectoryIndex index.html index.php
  5. Options -Indexes
  6.  
  7. <IfModule mod_php5.c>
  8. # Время жизни сессии в секундах
  9. php_value session.gc_maxlifetime 3600
  10. # Время жизни куки в секундах
  11. php_value session.cookie_lifetime 3600
  12. php_flag display_errors off
  13. php_flag register_globals Off
  14. php_flag file_uploads On
  15. php_flag allow_url_fopen off
  16. php_flag magic_quotes_gpc On
  17. php_flag magic_quotes_runtime Off
  18. php_value upload_max_filesize 600M
  19. php_value post_max_size 600M
  20.  
  21.  
  22. #Включает отслеживание сим-ссылок
  23. Options +FollowSymLinks
  24. #Запускает url_rewriting
  25. RewriteEngine On
  26. #Блокирует все ссылки, содержащие <script>
  27. RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
  28. #Блокирует все скрипты, которые пытаются изменить переменные PHP Globals:
  29. RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
  30. #Блокирует все скрипты, которые пытаются изменить переменную _REQUEST:
  31. RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
  32. #Перенаправляет все подобные попытки на страницу с ошибкой 403 - запрещено
  33. RewriteRule ^(.*)$ index.php [F,L]
  34.  
  35. RewriteRule ^modules/forum/section/([0-9]+)/? modules/forum/section.php?id=$1 [L]
  36.  
  37. <ifModule mod_gzip.c>
  38. mod_gzip_on Yes
  39. mod_gzip_dechunk Yes
  40. mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  41. mod_gzip_item_include handler ^cgi-script$
  42. mod_gzip_item_include mime ^text/.*
  43. mod_gzip_item_include mime ^application/x-javascript.*
  44. mod_gzip_item_exclude mime ^image/.*
  45. mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
  46. </ifModule>
  47.  
  48. <IfModule mod_expires.c>
  49. ExpiresActive On
  50. ExpiresByType application/javascript "access plus 7 days"
  51. ExpiresByType text/javascript "access plus 7 days"
  52. ExpiresByType text/css "access plus 7 days"
  53. ExpiresByType image/gif "access plus 7 days"
  54. ExpiresByType image/jpeg "access plus 7 days"
  55. ExpiresByType image/png "access plus 7 days"
  56. </IfModule>
  57. </IfModule>