# BEGIN NinjaFirewall
SetEnv PHPRC /var/www/user123/public_html/mysite.ru/php.ini
# END NinjaFirewall
AddDefaultCharset utf-8
AddType "application/x-rar-compressed" .rar
AddType "application/rar" .rar
AddType "application/x-compressed" .rar
AddType "application/x-rar" .rar
AddType "application/x-rar-compressed; application/x-compressed" .rar
AddType "compressed/rar; application/x-rar-compressed" .rar
AddType "application/zip" .zip
LimitRequestBody 10240000
ServerSignature Off
Options -Indexes
ExpiresByType image/gif "modification plus 2 days"
ExpiresByType image/jpeg "modification plus 2 days"
ExpiresByType image/jpg "modification plus 2 days"
ExpiresByType image/png "modification plus 2 days"
DirectoryIndex index.php index.html /index.php
ErrorDocument 400 /404.php
ErrorDocument 401 /404.php
ErrorDocument 403 /404.php
ErrorDocument 404 /404.php
RedirectMatch 403 /\..*$
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
RewriteRule ^wp-includes/theme-compat/ - [F,L]
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK|DEBUG) [NC]
RewriteRule ^(.*)$ - [F,L]
RewriteCond %{QUERY_STRING} ^.*(http|https|ftp)(%3A|:)(%2F|/)(%2F|/)(w){0,3}.?(blogger|picasa|blogspot|tsunami|petapolitik|photobucket|imgur|imageshack|wordpress\.com|img\.youtube|tinypic\.com|upload\.wikimedia|kkc|start-thegame).*$ [NC,OR]
RewriteCond %{THE_REQUEST} ^.*(http|https|ftp)(%3A|:)(%2F|/)(%2F|/)(w){0,3}.?(blogger|picasa|blogspot|tsunami|petapolitik|photobucket|imgur|imageshack|wordpress\.com|img\.youtube|tinypic\.com|upload\.wikimedia|kkc|start-thegame).*$ [NC]
RewriteRule .* index.php [F,L]
RewriteCond %{REQUEST_URI} (timthumb\.php|phpthumb\.php|thumb\.php|thumbs\.php) [NC]
RewriteCond %{HTTP_REFERER} ^.*demo5.local.*
RewriteRule . - [S=1]
RewriteCond %{HTTP_USER_AGENT} (havij|libwww-perl|wget|python|nikto|curl|scan|java|winhttp|clshttp|loader) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (;|<|>|'|"|\)|\(|%0A|%0D|%22|%27|%28|%3C|%3E|%00).*(libwww-perl|wget|python|nikto|curl|scan|java|winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) [NC,OR]
RewriteCond %{THE_REQUEST} \?\ HTTP/ [NC,OR]
RewriteCond %{THE_REQUEST} \/\*\ HTTP/ [NC,OR]
RewriteCond %{THE_REQUEST} etc/passwd [NC,OR]
RewriteCond %{THE_REQUEST} cgi-bin [NC,OR]
RewriteCond %{THE_REQUEST} (%0A|%0D|\\r|\\n) [NC,OR]
RewriteCond %{REQUEST_URI} owssvr\.dll [NC,OR]
RewriteCond %{HTTP_REFERER} (%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
RewriteCond %{HTTP_REFERER} \.opendirviewer\. [NC,OR]
RewriteCond %{HTTP_REFERER} users\.skynet\.be.* [NC,OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=(\.\.//?)+ [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=/([a-z0-9_.]//?)+ [NC,OR]
RewriteCond %{QUERY_STRING} \=PHP[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} [NC,OR]
RewriteCond %{QUERY_STRING} (\.\./|\.\.) [OR]
RewriteCond %{QUERY_STRING} ftp\: [NC,OR]
RewriteCond %{QUERY_STRING} http\: [NC,OR]
RewriteCond %{QUERY_STRING} https\: [NC,OR]
RewriteCond %{QUERY_STRING} \=\|w\| [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)/self/(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)cPath=http://(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*embed.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^e]*e)+mbed.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*object.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^o]*o)+bject.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*iframe.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^i]*i)+frame.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [NC,OR]
RewriteCond %{QUERY_STRING} base64_(en|de)code[^(]*\([^)]*\) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} ^.*(\(|\)|<|>|%3c|%3e).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(\x00|\x04|\x08|\x0d|\x1b|\x20|\x3c|\x3e|\x7f).* [NC,OR]
RewriteCond %{QUERY_STRING} (NULL|OUTFILE|LOAD_FILE) [OR]
RewriteCond %{QUERY_STRING} (\./|\../|\.../)+(motd|etc|bin) [NC,OR]
RewriteCond %{QUERY_STRING} (localhost|loopback|127\.0\.0\.1) [NC,OR]
RewriteCond %{QUERY_STRING} (<|>|'|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
RewriteCond %{QUERY_STRING} concat[^\(]*\( [NC,OR]
RewriteCond %{QUERY_STRING} union([^s]*s)+elect [NC,OR]
RewriteCond %{QUERY_STRING} union([^a]*a)+ll([^s]*s)+elect [NC,OR]
RewriteCond %{QUERY_STRING} \-[sdcr].*(allow_url_include|allow_url_fopen|safe_mode|disable_functions|auto_prepend_file) [NC,OR]
RewriteCond %{QUERY_STRING} (;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|drop|delete|update|cast|create|char|convert|alter|declare|order|script|set|md5|benchmark|encode) [NC,OR]
RewriteCond %{QUERY_STRING} (sp_executesql) [NC]
RewriteRule ^(.*)$ - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RedirectMatch (timthumb)\.php$ /.htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^http://mysite.ru [NC]
RewriteRule ^(.*)$ http://www.mysite.ru/$1 [R=301,L]
Order allow,deny
Deny from all
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*mysite.ru.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L]
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/robots.txt$ [NC]
RewriteCond %{REQUEST_URI} robots\.txt [NC]
RewriteRule .* http://www.mysite.ru/robots.txt [R=301,L]
Redirect 301 /tanki-yaponii-vo-vtoroj-mirovoj-vojne http://www.mysite.ru/tanki-yaponii/
Redirect 301 /tanki-kitaya-vo-vtoroj-mirovoj-vojne http://www.mysite.ru/tanki-kitaya/
Redirect 301 /warplanes/world-of-warplanes http://www.mysite.ru/world-of-warplanes/
Redirect 301 /warplanes http://www.mysite.ru/
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www\.)?protank\.su [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?teasernet\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?forum.worldoftanks\.ru [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?forum.worldoftanks\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?forum.worldoftanks\.eu [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?wiki.worldoftanks\.ru [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?bozzi\.ru [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yandex\.ru/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yandex\.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?google\.ru/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?google\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?google\.com.ua/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?google\.by/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yahoo\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?nigma\.ru/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?rambler.ru\.ru/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?gogo\.ru/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mail\.ru/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?wowlol\.ru/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?undsoft\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?feedburner\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?poisk\.ru/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?plus.google\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?vk\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?facebook\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?twitter\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?odnoklassniki\.ru/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|png|js|css|rar|7z|zip|flv|mp4|mp3|avi)$ nohotlink.png [L]
RewriteCond %{QUERY_STRING} boot.ini [NC,OR]
RewriteCond %{QUERY_STRING} mosConfig [NC,OR]
RewriteCond %{QUERY_STRING} ftp: [NC,OR]
RewriteCond %{QUERY_STRING} tag= [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(globals|encode|config|localhost|loopback).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(request|select|insert|union|declare|drop).* [NC]
RewriteRule ^(.*)$ - [F,L]
order allow,deny
deny from all
order allow,deny
deny from all