php_value date.timezone Europe/Moscow
php_value register_globals 0
php_value error_reporting 2047
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
php_value magic_quotes_sybase 0
php_value allow_url_fopen 0
php_value session.use_trans_sid "1"
php_value session.gc_maxlifetime 7200
php_value session.cookie_lifetime 7200
php_value output_buffering On
php_value output_buffering 4096
php_flag display_errors off
php_flag register_globals off
php_flag display_startup_errors off
php_flag magic_quotes_gpc off
php_flag session.use_only_cookies on
php_value default_charset UTF-8
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} ^www.127\.0.0.1$ [NC]
RewriteRule ^(.*)$ http://127.0.0.1/$1 [R=301,L]
#Ссылки#
RewriteRule ^reg?$ /registration.php [L,QSA]
RewriteRule ^menu?$ /menu.php [L,QSA]
RewriteRule ^exit?$ /user/exit.php [L,QSA]
DirectoryIndex index.php
Options -Indexes
Options +FollowSymLinks
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|php)$
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>
ErrorDocument 401 /error401.php
ErrorDocument 403 /error403.php
ErrorDocument 404 /error404.php
ErrorDocument 500 /error500.php
Order Deny,Allow
<Files ~ ".htaccess$">
Order allow,deny
Deny from All
Satisfy All
</Files>
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
<FilesMatch ".(gif|jpg|jpeg|png|ico|js|css|php)$">
Header set Cache-Control "max-age=86900"
</FilesMatch>
# Блокируем любой скрипт, который пытается установить sbp or sb_authorname чере URL (баг simpleboard)#
RewriteCond %{QUERY_STRING} sbp(=|%20|%3D) [OR]
RewriteCond %{QUERY_STRING} sb_authorname(=|%20|%3D)
#Далее список юзерагентов которым мы запрещаем доступ
SetEnvIfNoCase User-Agent JS-Kit bad_bot
SetEnvIfNoCase User-Agent PostRank bad_bot
SetEnvIfNoCase User-Agent Python-urllib bad_bot
SetEnvIfNoCase User-Agent UnwindFetchor bad_bot
SetEnvIfNoCase User-Agent facebookexternalhit bad_bot
SetEnvIfNoCase User-Agent TweetmemeBot bad_bot
SetEnvIfNoCase User-Agent Butterfly bad_bot
SetEnvIfNoCase User-Agent MFE_expand bad_bot
SetEnvIfNoCase User-Agent Java bad_bot
SetEnvIfNoCase User-Agent Summify bad_bot
SetEnvIfNoCase User-Agent MetaURI bad_bot
SetEnvIfNoCase User-Agent FlipboardProxy bad_bot
SetEnvIfNoCase User-Agent ScribdReader bad_bot
SetEnvIfNoCase User-Agent RockMelt bad_bot
SetEnvIfNoCase User-Agent InAGist bad_bot
SetEnvIfNoCase User-Agent NING bad_bot
SetEnvIfNoCase User-Agent TweetedTimes bad_bot
SetEnvIfNoCase User-Agent PaperLiBot bad_bot
SetEnvIfNoCase User-Agent Library bad_bot
SetEnvIfNoCase User-Agent Ezooms bad_bot
SetEnvIfNoCase User-Agent strawberryj bad_bot
SetEnvIfNoCase User-Agent Scooper bad_bot
SetEnvIfNoCase User-Agent Ahrefs bad_bot
SetEnvIfNoCase User-Agent Spider bad_bot
SetEnvIfNoCase User-Agent None bad_bot
SetEnvIfNoCase User-Agent EventMachine bad_bot
SetEnvIfNoCase User-Agent aiHitBot bad_bot
SetEnvIfNoCase User-Agent SolomonoBot bad_bot
SetEnvIfNoCase User-Agent SearchBot bad_bot
SetEnvIfNoCase User-Agent Wget bad_bot
SetEnvIfNoCase User-Agent Crawler bad_bot
Order Allow,Deny
Allow from all
Deny from env=bad_bot