RewriteEngine On 
RewriteCond %{HTTPS} !on 
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ 
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ 
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?ue.edu\.pk
RewriteRule ^(.*)$ https://www.ue.edu.pk/$1 [L,R=301]

# proc/self/environ? no way!
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
 
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
 
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
 
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
 
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|[|\%[0-9A-Z]{0,2}) [OR]
 
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|[|\%[0-9A-Z]{0,2})
 
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]



# [USER AGENTS]
 SetEnvIfNoCase User-Agent ^$ keep_out
 SetEnvIfNoCase User-Agent (binlar|casper|cmsworldmap|comodo|diavol|dotbot|feedfinder|flicky|ia_archiver|jakarta|kmccrew|nutch|planetwork|purebot|pycurl|skygrid|sucker|turnit|vikspider|zmeu) keep_out
# Order Allow, Deny
# Allow from all
 Deny from env=keep_out

SetEnvIfNoCase User-Agent "^libwww-perl*" block_bad_bots
Deny from env=block_bad_bots


<files ~ "^.*\.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</files>

# Deny access to readme.html
<files readme.html>
Order allow,deny
Deny from all
</files>

# Deny access to license.txt
<files license.txt>
Order allow,deny
Deny from all
</files>
 
# Deny access to wp-config.php file
<files wp-config.php>
order allow,deny
deny from all
</files>
 
# Deny access to error_log
<files error_log>
Order allow,deny
Deny from all
</files>

<Files ~ "^\w+\.(gif|jpe?g|png)$">
order deny,allow
allow from all
</Files>


<Files ~ "\.(js|css)$">
  order allow,deny
  allow from all
</Files>


# Block access to the .htaccess file
<files .htaccess>
order allow,deny
deny from all
</files>

<files php.ini>
order allow,deny
deny from all
</files>

<files config.php>
order allow,deny
deny from all
</files>


# No web server version and indexes
ServerSignature Off
Options All -Indexes
Options FollowSymLinks

RewriteRule ^beta/(.*)$ /$1 [R=301,NC,L]

# drop Range header when more than 5 ranges.
# CVE-2011-3192
SetEnvIf Range (,.*?){5,} bad-range=1
RequestHeader unset Range env=bad-range
# optional logging.
#CustomLog insert-path-and-name-of-log common env=bad-range

# Don't allow any pages to be framed - Defends against CSRF
Header set X-Frame-Options DENY

# prevent mime based attacks
Header set X-Content-Type-Options "nosniff"

# Only allow JavaScript from the same domain to be run.
# Don't allow inline JavaScript to run.
Header set X-Content-Security-Policy "allow 'self';"

# Turn on IE8-IE9 XSS prevention tools
Header set X-XSS-Protection "1; mode=block"

# Blocks some XSS attacks
<IfModule mod_rewrite.c>
RewriteCond %{QUERY_STRING} (\|%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]
</IfModule>


## Sql Injection prevention


<IfModule mod_rewrite.c>
# Enable rewrite engine
RewriteEngine On

# Block suspicious request methods
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK|DEBUG) [NC]
RewriteRule ^(.*)$ - [F,L]

# Block WP timthumb hack
RewriteCond %{REQUEST_URI} (timthumb\.php|phpthumb\.php|thumb\.php|thumbs\.php) [NC]
RewriteRule . - [S=1]

# Block suspicious user agents and requests
RewriteCond %{HTTP_USER_AGENT} (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) [NC,OR]

# Block MySQL injections, RFI, base64, etc.
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http%3A%2F%2F [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).*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} ^.*(\[|\]|\(|\)|<|>).* [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} (;|<|>|'|"|\)|%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]

# PHP-CGI Vulnerability
RewriteCond %{QUERY_STRING} ^(%2d|\-)[^=]+$ [NC,OR]

#proc/self/environ? no way!
RewriteCond %{QUERY_STRING} proc\/self\/environ [NC,OR]

RewriteCond %{QUERY_STRING} (sp_executesql) [NC]
RewriteRule ^(.*)$ - [F,L]

</IfModule>


# Protect Against SQL Injection
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC]
RewriteRule ^(.*)$ - [F,L]
RewriteCond %{QUERY_STRING} \.\.\/ [NC,OR]
RewriteCond %{QUERY_STRING} boot\.ini [NC,OR]
RewriteCond %{QUERY_STRING} tag\= [NC,OR]
RewriteCond %{QUERY_STRING} ftp\:  [NC,OR]
RewriteCond %{QUERY_STRING} http\:  [NC,OR]
RewriteCond %{QUERY_STRING} https\:  [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [NC,OR]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(\[|\]|\(|\)|<|>|ê|"|;|\?|\*|=$).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(%24&x).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(%0|%A|%B|%C|%D|%E|%F|127\.0).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(globals|encode|localhost|loopback).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(request|select|insert|union|declare).* [NC]
RewriteCond %{HTTP_COOKIE} !^.*WordPress_logged_in_.*$
RewriteRule ^(.*)$ - [F,L]
</IfModule>

<Files *.php>
#deny from all
</Files>

# custom error pages
 ErrorDocument 206 https://www.google.com/
 ErrorDocument 302 https://www.google.com/
 ErrorDocument 400 https://www.google.com/
 ErrorDocument 401 https://www.google.com/
 ErrorDocument 403 https://www.google.com/
 ErrorDocument 404 https://www.google.com/
 ErrorDocument 500 https://www.google.com/
 ErrorDocument 503 https://www.google.com/
 
 




deny from 195.201.206.42
deny from 31.132.4.75
deny from 45.92.126.90
deny from 223.149.22.144
deny from 216.218.206.69
deny from 195.54.160.21
deny from 47.113.87.53
deny from 162.142.125.56
deny from 121.209.132.165
deny from 88.99.64.133
deny from 172.69.170.106
deny from 172.69.170.52
deny from 172.69.170.100
deny from 137.226.113.10
deny from 88.0.0.0/8
deny from 137.226.0.0/16
deny from 192.35.0.0/16
deny from 47.0.0.0/8





# -------------------------------------------------------
# Free IP2Location Firewall List by Country
# Source: https://www.ip2location.com/free/visitor-blocker
# Last Generated: 23 Aug 2021 14:25:35 GMT
# [Important] Please update this list every month
# -------------------------------------------------------
<Limit GET HEAD POST>
order deny,allow
allow from 14.1.104.0/22
allow from 14.192.128.0/19
allow from 27.0.184.0/22
allow from 27.54.120.0/22
allow from 27.96.92.0/22
allow from 27.255.0.0/18
allow from 31.6.58.0/24
allow from 34.98.208.0/21
allow from 34.100.112.0/22
allow from 34.100.117.0/25
allow from 34.100.117.128/26
allow from 34.100.117.192/27
allow from 34.100.117.224/28
allow from 34.100.117.240/29
allow from 34.100.117.248/30
allow from 34.100.117.252/31
allow from 34.100.117.254/32
allow from 34.124.67.0/25
allow from 34.124.67.128/27
allow from 34.124.67.160/30
allow from 34.124.67.164/32
allow from 34.124.67.166/31
allow from 34.124.67.168/29
allow from 34.124.67.176/28
allow from 34.124.67.192/26
allow from 36.255.32.0/22
allow from 36.255.40.0/21
allow from 36.255.100.0/22
allow from 36.255.213.0/24
allow from 36.255.214.0/24
allow from 37.111.128.0/18
allow from 39.32.0.0/11
allow from 42.83.84.0/22
allow from 42.201.128.0/17
allow from 43.224.236.0/22
allow from 43.225.98.0/23
allow from 43.229.164.0/22
allow from 43.230.92.0/22
allow from 43.231.60.0/22
allow from 43.242.100.0/22
allow from 43.242.176.0/22
allow from 43.245.8.0/22
allow from 43.245.128.0/22
allow from 43.245.204.0/22
allow from 43.246.220.0/22
allow from 43.246.224.0/22
allow from 43.247.120.0/22
allow from 43.248.12.0/22
allow from 43.250.84.0/22
allow from 43.251.252.0/22
allow from 43.254.12.0/22
allow from 45.64.24.0/22
allow from 45.64.180.0/22
allow from 45.90.40.0/24
allow from 45.113.124.0/22
allow from 45.115.49.0/24
allow from 45.115.84.0/22
allow from 45.116.232.0/22
allow from 45.117.88.0/22
allow from 45.117.104.0/22
allow from 45.120.196.0/22
allow from 45.135.236.0/22
allow from 45.137.116.0/22
allow from 45.140.28.0/22
allow from 45.249.8.0/22
allow from 46.244.29.48/28
allow from 46.244.29.208/28
allow from 46.244.29.248/29
allow from 57.90.136.0/22
allow from 57.92.240.0/20
allow from 58.27.128.0/17
allow from 58.65.128.0/18
allow from 58.65.192.0/19
allow from 58.84.28.0/22
allow from 58.181.96.0/19
allow from 59.103.0.0/16
allow from 61.5.128.0/19
allow from 63.70.24.0/22
allow from 63.109.248.56/29
allow from 63.109.248.88/29
allow from 63.109.249.144/29
allow from 63.114.37.0/24
allow from 64.71.139.224/27
allow from 64.71.184.56/31
allow from 64.71.184.59/32
allow from 64.77.13.16/29
allow from 64.77.39.200/29
allow from 64.86.121.0/24
allow from 64.86.122.0/24
allow from 64.86.131.0/24
allow from 66.160.172.128/25
allow from 69.88.22.0/28
allow from 69.88.22.32/29
allow from 69.88.22.48/29
allow from 69.88.24.104/29
allow from 69.88.24.136/29
allow from 69.88.24.216/29
allow from 72.255.0.0/18
allow from 80.77.8.0/22
allow from 80.247.138.0/29
allow from 80.247.152.0/29
allow from 80.247.152.48/28
allow from 80.247.152.64/27
allow from 80.247.152.104/29
allow from 80.247.152.112/28
allow from 82.195.180.246/32
allow from 85.204.30.0/23
allow from 89.33.128.0/23
allow from 89.33.204.0/23
allow from 89.33.234.0/23
allow from 89.34.88.0/23
allow from 89.34.94.0/23
allow from 89.34.168.0/23
allow from 89.34.176.0/23
allow from 89.35.58.0/23
allow from 89.35.156.0/23
allow from 89.35.176.0/23
allow from 89.37.30.0/23
allow from 89.37.42.0/23
allow from 89.38.242.0/23
allow from 89.39.186.0/23
allow from 89.40.38.0/23
allow from 89.40.90.0/23
allow from 89.40.110.0/23
allow from 89.40.128.0/23
allow from 89.41.32.0/23
allow from 89.41.58.0/23
allow from 89.42.32.0/23
allow from 89.43.204.0/23
allow from 89.44.112.0/23
allow from 89.44.118.0/23
allow from 89.44.146.0/23
allow from 89.44.202.0/23
allow from 89.45.68.0/23
allow from 89.45.230.0/23
allow from 89.46.44.0/23
allow from 101.50.64.0/18
allow from 101.53.224.0/19
allow from 102.129.211.0/24
allow from 102.165.11.0/24
allow from 103.4.92.0/22
allow from 103.7.60.0/22
allow from 103.7.76.0/22
allow from 103.8.14.0/23
allow from 103.8.112.0/22
allow from 103.8.214.0/24
allow from 103.8.231.0/24
allow from 103.9.23.0/24
allow from 103.9.182.0/24
allow from 103.11.0.0/22
allow from 103.11.60.0/22
allow from 103.11.68.0/22
allow from 103.11.220.0/24
allow from 103.12.40.0/22
allow from 103.12.58.0/24
allow from 103.12.120.0/22
allow from 103.12.196.0/22
allow from 103.13.1.0/24
allow from 103.17.200.0/22
allow from 103.18.8.0/21
allow from 103.18.20.0/22
allow from 103.18.116.0/24
allow from 103.18.243.0/24
allow from 103.20.0.0/22
allow from 103.20.132.0/22
allow from 103.24.96.0/22
allow from 103.25.136.0/22
allow from 103.26.80.0/21
allow from 103.26.184.0/22
allow from 103.27.20.0/22
allow from 103.28.150.0/23
allow from 103.28.152.0/22
allow from 103.29.163.0/24
allow from 103.31.80.0/22
allow from 103.31.92.0/22
allow from 103.31.100.0/22
allow from 103.31.104.0/22
allow from 103.35.208.0/21
allow from 103.39.80.0/22
allow from 103.44.223.0/24
allow from 103.48.24.0/23
allow from 103.49.69.0/24
allow from 103.49.136.0/22
allow from 103.50.156.0/22
allow from 103.51.220.0/24
allow from 103.53.44.0/22
allow from 103.55.68.0/22
allow from 103.55.133.0/24
allow from 103.55.136.0/23
allow from 103.57.152.0/22
allow from 103.57.168.0/22
allow from 103.62.232.0/22
allow from 103.69.110.0/23
allow from 103.70.84.0/22
allow from 103.70.250.0/23
allow from 103.72.0.0/22
allow from 103.72.84.0/22
allow from 103.73.100.0/22
allow from 103.73.234.0/24
allow from 103.74.20.0/22
allow from 103.75.244.0/22
allow from 103.76.3.0/24
allow from 103.76.28.0/23
allow from 103.77.8.0/22
allow from 103.78.134.0/23
allow from 103.79.16.0/22
allow from 103.82.120.0/22
allow from 103.82.252.0/22
allow from 103.83.20.0/22
allow from 103.84.52.0/22
allow from 103.84.148.0/22
allow from 103.85.128.0/24
allow from 103.85.131.0/24
allow from 103.85.152.0/23
allow from 103.86.8.0/22
allow from 103.86.36.0/22
allow from 103.86.52.0/22
allow from 103.86.132.0/22
allow from 103.87.162.0/24
allow from 103.87.192.0/22
allow from 103.90.7.0/24
allow from 103.92.20.0/22
allow from 103.93.12.0/22
allow from 103.93.95.0/24
allow from 103.93.208.0/24
allow from 103.93.216.0/22
allow from 103.94.102.0/24
allow from 103.94.186.0/24
allow from 103.94.244.0/24
allow from 103.97.154.0/24
allow from 103.97.168.0/23
allow from 103.100.103.0/24
allow from 103.100.188.0/24
allow from 103.100.202.0/23
allow from 103.101.232.0/24
allow from 103.102.38.0/24
allow from 103.102.40.0/23
allow from 103.102.156.0/22
allow from 103.103.42.0/23
allow from 103.103.112.0/24
allow from 103.104.84.0/23
allow from 103.104.87.0/24
allow from 103.104.96.0/23
allow from 103.104.160.0/22
allow from 103.104.192.0/23
allow from 103.104.194.0/24
allow from 103.104.195.0/26
allow from 103.104.195.64/27
allow from 103.104.195.96/28
allow from 103.104.195.228/30
allow from 103.104.195.232/29
allow from 103.104.195.240/29
allow from 103.104.195.248/30
allow from 103.104.195.252/32
allow from 103.104.212.0/22
allow from 103.105.208.0/22
allow from 103.106.86.0/24
allow from 103.109.121.0/24
allow from 103.110.52.0/24
allow from 103.111.84.0/23
allow from 103.111.160.0/23
allow from 103.112.152.0/22
allow from 103.113.100.0/22
allow from 103.115.196.0/22
allow from 103.116.248.0/22
allow from 103.117.160.0/22
allow from 103.119.125.0/24
allow from 103.120.70.0/23
allow from 103.120.116.0/22
allow from 103.121.28.0/22
allow from 103.121.40.0/22
allow from 103.121.120.0/23
allow from 103.122.158.0/23
allow from 103.123.75.0/24
allow from 103.123.112.0/22
allow from 103.125.60.0/24
allow from 103.125.68.0/22
allow from 103.125.140.0/22
allow from 103.125.176.0/22
allow from 103.125.240.0/22
allow from 103.127.36.0/22
allow from 103.129.140.0/22
allow from 103.130.156.0/22
allow from 103.131.8.0/22
allow from 103.131.212.0/22
allow from 103.134.0.0/22
allow from 103.134.236.0/22
allow from 103.135.44.0/23
allow from 103.137.20.0/23
allow from 103.137.24.0/22
allow from 103.137.68.0/22
allow from 103.138.11.0/24
allow from 103.138.51.0/24
allow from 103.138.162.0/23
allow from 103.138.222.0/23
allow from 103.139.62.0/24
allow from 103.139.122.0/24
allow from 103.139.124.0/23
allow from 103.139.140.0/23
allow from 103.139.176.0/23
allow from 103.140.30.0/23
allow from 103.140.123.0/24
allow from 103.140.216.0/23
allow from 103.141.4.0/23
allow from 103.141.43.0/24
allow from 103.141.158.0/23
allow from 103.141.229.0/24
allow from 103.144.10.0/23
allow from 103.145.158.0/24
allow from 103.145.184.0/23
allow from 103.145.230.0/23
allow from 103.146.136.0/23
allow from 103.147.42.0/23
allow from 103.147.86.0/23
allow from 103.148.92.0/23
allow from 103.148.128.0/23
allow from 103.148.154.0/23
allow from 103.148.162.0/24
allow from 103.149.8.0/23
allow from 103.149.32.0/23
allow from 103.149.39.0/25
allow from 103.149.216.0/24
allow from 103.149.240.0/23
allow from 103.150.9.0/24
allow from 103.150.42.0/23
allow from 103.150.82.0/23
allow from 103.150.105.0/24
allow from 103.150.154.0/23
allow from 103.150.206.0/23
allow from 103.150.208.0/23
allow from 103.150.238.0/23
allow from 103.150.242.0/23
allow from 103.151.42.0/23
allow from 103.151.46.0/23
allow from 103.151.236.0/23
allow from 103.152.42.0/23
allow from 103.152.100.0/23
allow from 103.152.116.0/23
allow from 103.152.254.0/23
allow from 103.153.14.0/23
allow from 103.153.38.0/23
allow from 103.153.116.0/23
allow from 103.153.157.241/32
allow from 103.153.157.242/31
allow from 103.153.157.244/30
allow from 103.153.157.248/29
allow from 103.154.64.0/23
allow from 103.154.107.0/24
allow from 103.154.186.0/23
allow from 103.154.196.0/23
allow from 103.155.4.0/23
allow from 103.155.18.0/23
allow from 103.155.145.0/24
allow from 103.156.136.0/23
allow from 103.156.152.0/23
allow from 103.156.244.0/23
allow from 103.157.40.0/23
allow from 103.157.66.0/23
allow from 103.157.88.0/23
allow from 103.157.154.0/23
allow from 103.157.200.0/23
allow from 103.157.210.0/23
allow from 103.157.214.0/23
allow from 103.157.248.0/23
allow from 103.158.12.0/24
allow from 103.158.35.0/24
allow from 103.159.24.0/23
allow from 103.159.74.0/23
allow from 103.159.78.0/23
allow from 103.161.48.0/23
allow from 103.161.154.0/23
allow from 103.162.40.0/23
allow from 103.162.90.0/23
allow from 103.162.136.0/23
allow from 103.162.148.0/23
allow from 103.163.48.0/23
allow from 103.163.238.0/23
allow from 103.163.254.0/23
allow from 103.164.8.0/23
allow from 103.164.48.0/23
allow from 103.165.176.0/24
allow from 103.166.102.0/23
allow from 103.166.150.0/23
allow from 103.167.3.0/24
allow from 103.167.158.0/23
allow from 103.167.162.0/23
allow from 103.167.254.0/23
allow from 103.168.40.0/23
allow from 103.169.64.0/23
allow from 103.169.98.0/23
allow from 103.193.18.0/24
allow from 103.194.92.0/22
allow from 103.196.160.0/22
allow from 103.197.44.0/22
allow from 103.200.196.0/22
allow from 103.203.44.0/22
allow from 103.205.176.0/22
allow from 103.207.84.0/22
allow from 103.209.52.0/23
allow from 103.209.84.0/22
allow from 103.210.4.0/22
allow from 103.213.108.0/22
allow from 103.213.112.0/22
allow from 103.216.104.0/22
allow from 103.216.135.0/24
allow from 103.217.176.0/22
allow from 103.221.246.0/23
allow from 103.224.12.0/22
allow from 103.225.48.0/22
allow from 103.225.220.0/22
allow from 103.226.216.0/23
allow from 103.228.156.0/22
allow from 103.232.225.0/24
allow from 103.234.144.0/22
allow from 103.235.76.0/22
allow from 103.236.132.0/22
allow from 103.240.220.0/24
allow from 103.241.52.0/23
allow from 103.243.66.121/32
allow from 103.243.66.122/31
allow from 103.243.66.124/31
allow from 103.243.66.126/32
allow from 103.243.66.143/32
allow from 103.243.66.144/28
allow from 103.243.66.160/27
allow from 103.243.66.192/27
allow from 103.243.66.224/29
allow from 103.244.172.0/22
allow from 103.244.176.0/22
allow from 103.245.132.0/22
allow from 103.245.192.0/22
allow from 103.246.108.0/22
allow from 103.247.66.0/24
allow from 103.247.124.0/23
allow from 103.249.152.0/22
allow from 103.249.228.0/22
allow from 103.250.222.0/23
allow from 103.252.80.0/22
allow from 103.253.156.0/22
allow from 103.255.4.0/22
allow from 103.255.128.0/22
allow from 103.255.148.0/22
allow from 104.99.130.0/23
allow from 104.99.132.0/22
allow from 107.174.33.192/27
allow from 107.191.98.45/32
allow from 110.34.32.0/21
allow from 110.36.0.0/14
allow from 110.93.192.0/18
allow from 110.232.188.0/22
allow from 111.68.96.0/20
allow from 111.88.0.0/16
allow from 111.92.128.0/19
allow from 111.119.160.0/19
allow from 113.197.48.0/21
allow from 113.203.192.0/18
allow from 113.208.72.0/23
allow from 114.198.233.0/24
allow from 115.42.64.0/20
allow from 115.167.0.0/19
allow from 115.167.48.0/22
allow from 115.167.52.0/23
allow from 115.167.55.0/24
allow from 115.167.64.0/22
allow from 115.167.72.0/22
allow from 115.167.96.0/19
allow from 115.186.0.0/17
allow from 115.186.128.0/18
allow from 116.0.32.0/19
allow from 116.58.0.0/17
allow from 116.71.0.0/16
allow from 116.90.96.0/19
allow from 116.197.156.0/22
allow from 116.204.164.0/22
allow from 116.206.64.0/22
allow from 116.206.84.0/22
allow from 116.206.140.0/22
allow from 116.206.164.0/22
allow from 116.213.32.0/22
allow from 117.18.244.0/22
allow from 117.18.248.0/22
allow from 117.20.16.0/20
allow from 117.53.40.0/22
allow from 117.102.0.0/18
allow from 118.103.224.0/20
allow from 118.107.128.0/20
allow from 119.30.64.0/18
allow from 119.63.128.0/20
allow from 119.73.0.0/17
allow from 119.152.0.0/13
allow from 119.160.0.0/17
allow from 121.46.64.0/22
allow from 121.52.144.0/20
allow from 121.91.32.0/19
allow from 122.10.252.0/23
allow from 122.50.0.0/22
allow from 122.129.64.0/19
allow from 122.201.35.192/29
allow from 122.201.36.152/29
allow from 122.254.64.0/21
allow from 122.254.72.0/22
allow from 123.108.92.0/22
allow from 123.253.92.0/22
allow from 124.29.192.0/18
allow from 124.109.32.0/19
allow from 125.62.88.0/22
allow from 125.209.64.0/18
allow from 129.227.226.0/24
allow from 129.227.228.0/24
allow from 131.226.39.1/32
allow from 134.238.11.160/27
allow from 134.238.11.192/26
allow from 134.238.12.0/24
allow from 134.238.13.0/25
allow from 134.238.13.128/26
allow from 137.59.144.0/22
allow from 137.59.192.0/22
allow from 137.59.216.0/21
allow from 137.59.224.0/21
allow from 137.83.241.0/24
allow from 139.5.116.0/22
allow from 139.135.32.0/19
allow from 139.190.0.0/20
allow from 139.190.16.0/24
allow from 139.190.18.0/23
allow from 139.190.20.0/22
allow from 139.190.24.0/21
allow from 139.190.56.0/24
allow from 139.190.96.0/19
allow from 139.190.224.0/21
allow from 139.190.234.0/23
allow from 139.190.236.0/22
allow from 139.190.240.0/20
allow from 144.48.120.0/22
allow from 144.48.128.0/21
allow from 146.70.12.0/24
allow from 148.253.16.153/32
allow from 148.253.16.154/31
allow from 148.253.16.156/31
allow from 148.253.16.158/32
allow from 149.71.32.0/31
allow from 150.129.4.0/22
allow from 154.16.29.0/24
allow from 154.16.223.0/24
allow from 154.57.192.0/19
allow from 154.59.40.0/24
allow from 154.59.43.0/24
allow from 154.59.44.0/24
allow from 154.85.64.0/19
allow from 154.192.0.0/16
allow from 154.198.13.0/24
allow from 156.109.35.96/29
allow from 156.241.192.0/18
allow from 157.167.91.0/24
allow from 159.138.186.0/23
allow from 160.19.20.0/22
allow from 162.12.208.0/22
allow from 162.158.199.0/24
allow from 165.1.180.1/32
allow from 165.1.180.2/31
allow from 165.1.180.4/30
allow from 165.1.180.8/29
allow from 165.1.180.16/28
allow from 165.1.180.32/27
allow from 165.1.180.64/27
allow from 165.1.180.96/28
allow from 165.1.180.112/29
allow from 165.1.180.120/30
allow from 165.1.180.124/31
allow from 165.1.180.126/32
allow from 165.1.181.65/32
allow from 165.1.181.66/31
allow from 165.1.181.68/30
allow from 165.1.181.72/29
allow from 165.1.181.80/28
allow from 165.1.181.96/28
allow from 165.1.181.112/29
allow from 165.1.181.120/30
allow from 165.1.181.124/31
allow from 165.1.181.126/32
allow from 165.1.181.129/32
allow from 165.1.181.130/31
allow from 165.1.181.132/30
allow from 165.1.181.136/29
allow from 165.1.181.144/28
allow from 165.1.181.160/28
allow from 165.1.181.176/29
allow from 165.1.181.184/30
allow from 165.1.181.188/31
allow from 165.1.181.190/32
allow from 165.1.237.1/32
allow from 165.1.237.2/31
allow from 165.1.237.4/30
allow from 165.1.237.8/29
allow from 165.1.237.16/28
allow from 165.1.237.32/27
allow from 165.1.237.64/27
allow from 165.1.237.96/28
allow from 165.1.237.112/29
allow from 165.1.237.120/30
allow from 165.1.237.124/31
allow from 165.1.237.126/32
allow from 165.1.237.129/32
allow from 165.1.237.130/31
allow from 165.1.237.132/30
allow from 165.1.237.136/29
allow from 165.1.237.144/28
allow from 165.1.237.160/27
allow from 165.1.237.192/27
allow from 165.1.237.224/28
allow from 165.1.237.240/29
allow from 165.1.237.248/30
allow from 165.1.237.252/31
allow from 165.1.237.254/32
allow from 165.1.239.65/32
allow from 165.1.239.66/31
allow from 165.1.239.68/30
allow from 165.1.239.72/29
allow from 165.1.239.80/29
allow from 165.1.239.88/30
allow from 165.1.239.92/31
allow from 165.1.239.94/32
allow from 165.1.239.97/32
allow from 165.1.239.98/31
allow from 165.1.239.100/30
allow from 165.1.239.104/29
allow from 165.1.239.112/29
allow from 165.1.239.120/30
allow from 165.1.239.124/31
allow from 165.1.239.126/32
allow from 172.69.38.0/23
allow from 172.69.111.0/24
allow from 172.69.224.0/23
allow from 172.69.244.0/23
allow from 175.107.0.0/18
allow from 175.107.192.0/18
allow from 175.110.80.0/21
allow from 175.110.96.0/22
allow from 175.110.104.0/21
allow from 175.111.0.0/20
allow from 180.92.128.0/19
allow from 180.149.208.0/20
allow from 180.178.128.0/18
allow from 182.176.0.0/12
allow from 182.255.48.0/22
allow from 185.56.163.16/28
allow from 185.167.218.0/24
allow from 185.170.41.0/24
allow from 185.196.93.0/24
allow from 185.196.94.0/24
allow from 185.211.43.0/24
allow from 185.228.92.0/22
allow from 185.233.16.0/22
allow from 191.101.134.0/24
allow from 192.135.90.0/23
allow from 192.140.144.0/21
allow from 192.142.130.0/23
allow from 192.142.138.0/24
allow from 192.142.168.0/23
allow from 192.142.171.0/24
allow from 192.142.192.0/19
allow from 192.144.78.0/23
allow from 192.169.116.0/24
allow from 192.210.198.248/29
allow from 192.227.144.136/29
allow from 195.75.247.0/24
allow from 195.79.220.0/25
allow from 195.79.220.128/27
allow from 196.3.72.0/24
allow from 196.62.7.0/24
allow from 196.62.21.0/24
allow from 196.62.58.0/24
allow from 196.62.91.0/24
allow from 196.194.195.0/24
allow from 196.194.196.0/23
allow from 196.194.198.0/24
allow from 196.194.201.0/24
allow from 196.194.202.0/23
allow from 196.194.204.0/22
allow from 196.194.208.0/21
allow from 196.194.216.0/23
allow from 196.194.220.0/24
allow from 196.194.222.0/23
allow from 196.194.246.0/24
allow from 196.194.253.0/24
allow from 196.194.254.0/23
allow from 196.195.64.0/19
allow from 196.195.96.0/20
allow from 196.246.120.0/22
allow from 196.246.200.0/24
allow from 196.246.215.0/24
allow from 196.246.216.0/24
allow from 196.246.224.0/24
allow from 198.23.140.60/30
allow from 198.144.191.32/27
allow from 199.182.235.0/24
allow from 202.0.110.0/24
allow from 202.3.130.0/23
allow from 202.4.167.0/24
allow from 202.5.130.0/23
allow from 202.5.132.0/24
allow from 202.5.134.0/23
allow from 202.5.136.0/21
allow from 202.5.144.0/20
allow from 202.14.70.0/23
allow from 202.43.118.0/23
allow from 202.44.80.0/20
allow from 202.45.156.0/23
allow from 202.47.32.0/19
allow from 202.47.94.0/24
allow from 202.52.32.0/24
allow from 202.55.128.0/22
allow from 202.59.12.0/22
allow from 202.59.64.0/19
allow from 202.59.254.0/24
allow from 202.61.32.0/19
allow from 202.63.192.0/19
allow from 202.69.8.0/21
allow from 202.69.32.0/19
allow from 202.70.144.0/20
allow from 202.83.160.0/20
allow from 202.92.16.0/20
allow from 202.123.240.0/20
allow from 202.125.128.0/19
allow from 202.141.224.0/25
allow from 202.141.224.128/29
allow from 202.141.224.136/31
allow from 202.141.224.138/32
allow from 202.141.224.140/30
allow from 202.141.224.144/30
allow from 202.141.224.149/32
allow from 202.141.224.150/31
allow from 202.141.224.152/29
allow from 202.141.224.160/27
allow from 202.141.224.192/26
allow from 202.141.225.0/24
allow from 202.141.226.0/23
allow from 202.141.228.0/22
allow from 202.141.232.0/21
allow from 202.141.240.0/20
allow from 202.142.144.0/20
allow from 202.142.160.0/27
allow from 202.142.160.32/28
allow from 202.142.160.48/29
allow from 202.142.160.56/30
allow from 202.142.160.61/32
allow from 202.142.160.62/31
allow from 202.142.160.64/26
allow from 202.142.160.128/25
allow from 202.142.161.0/24
allow from 202.142.162.0/23
allow from 202.142.164.0/22
allow from 202.142.168.0/21
allow from 202.142.176.0/20
allow from 202.143.112.0/20
allow from 202.147.160.0/19
allow from 202.154.224.0/19
allow from 202.160.252.0/29
allow from 202.160.252.32/28
allow from 202.160.252.64/27
allow from 202.163.64.0/18
allow from 202.165.224.0/21
allow from 202.165.232.0/22
allow from 202.165.236.0/23
allow from 202.165.238.0/24
allow from 202.165.242.0/24
allow from 202.165.244.0/24
allow from 202.165.246.0/23
allow from 202.165.248.0/23
allow from 202.165.250.0/24
allow from 202.166.160.0/20
allow from 202.174.142.0/25
allow from 202.174.148.40/29
allow from 202.174.157.0/26
allow from 203.3.132.0/24
allow from 203.6.208.0/22
allow from 203.11.65.0/24
allow from 203.16.34.0/24
allow from 203.26.77.0/24
allow from 203.80.128.0/24
allow from 203.80.130.0/24
allow from 203.81.192.0/19
allow from 203.81.224.0/20
allow from 203.82.48.0/20
allow from 203.92.4.0/23
allow from 203.96.168.0/22
allow from 203.99.48.0/20
allow from 203.99.160.0/19
allow from 203.101.160.0/19
allow from 203.109.40.0/22
allow from 203.124.24.0/21
allow from 203.124.32.0/19
allow from 203.128.0.0/19
allow from 203.128.252.0/22
allow from 203.129.0.0/22
allow from 203.130.0.0/19
allow from 203.133.252.0/22
allow from 203.134.252.0/22
allow from 203.135.0.0/18
allow from 203.142.218.0/24
allow from 203.161.179.0/24
allow from 203.170.64.0/20
allow from 203.175.64.0/20
allow from 203.176.190.0/23
allow from 203.212.28.0/22
allow from 203.215.160.0/19
allow from 203.222.43.193/32
allow from 203.223.160.0/20
allow from 204.157.96.0/21
allow from 205.164.104.0/21
allow from 205.164.128.0/19
allow from 206.42.96.0/19
allow from 206.84.128.0/18
allow from 206.85.176.0/20
allow from 208.127.3.0/32
allow from 208.127.3.127/32
allow from 208.127.3.128/32
allow from 208.127.3.255/32
allow from 208.127.4.0/32
allow from 208.127.4.127/32
allow from 208.127.4.128/32
allow from 208.127.4.255/32
allow from 208.127.5.0/32
allow from 208.127.5.127/32
allow from 208.127.5.128/32
allow from 208.127.5.255/32
allow from 208.127.26.129/32
allow from 208.127.26.130/31
allow from 208.127.26.132/30
allow from 208.127.26.136/29
allow from 208.127.26.144/28
allow from 208.127.26.160/27
allow from 208.127.26.192/27
allow from 208.127.26.224/28
allow from 208.127.26.240/29
allow from 208.127.26.248/30
allow from 208.127.26.252/31
allow from 208.127.26.254/32
allow from 208.127.165.169/32
allow from 208.127.165.170/31
allow from 208.127.165.172/30
allow from 208.127.165.176/28
allow from 208.127.165.192/27
allow from 208.127.165.224/28
allow from 208.127.165.240/29
allow from 208.127.165.248/30
allow from 208.127.165.252/32
allow from 208.127.166.169/32
allow from 208.127.166.170/31
allow from 208.127.166.172/30
allow from 208.127.166.176/28
allow from 208.127.166.192/27
allow from 208.127.166.224/28
allow from 208.127.166.240/31
allow from 208.127.166.242/32
allow from 208.127.166.244/30
allow from 208.127.166.248/30
allow from 208.127.166.252/32
allow from 208.194.251.0/24
allow from 208.207.92.0/23
allow from 208.232.94.0/23
allow from 208.240.136.0/22
allow from 209.150.144.0/20
allow from 210.2.128.0/18
allow from 210.5.193.64/26
allow from 210.5.199.0/24
allow from 210.5.204.128/25
allow from 210.5.205.128/25
allow from 210.5.209.128/26
allow from 210.5.209.240/29
allow from 210.5.211.0/26
allow from 210.5.211.64/29
allow from 210.5.213.0/24
allow from 210.5.217.0/24
allow from 210.5.221.0/29
allow from 210.5.221.16/28
allow from 210.56.0.0/19
allow from 210.89.75.32/29
allow from 212.165.146.16/29
allow from 212.165.146.32/27
allow from 212.165.146.64/29
allow from 212.165.146.88/29
allow from 212.165.146.96/28
allow from 212.165.158.48/28
allow from 212.165.158.64/28
allow from 212.165.158.88/29
allow from 212.165.158.112/28
allow from 212.165.158.128/27
allow from 212.165.159.0/24
allow from 218.100.85.0/24
allow from 221.120.192.0/18
allow from 221.132.112.0/21
allow from 223.29.224.0/20
deny from all
</Limit>

deny from 116.203.0.0/16


RewriteCond %{HTTP_USER_AGENT} ^evilbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^spambot [OR]
RewriteCond %{HTTP_USER_AGENT} ^mj12bot [OR]
RewriteCond %{HTTP_USER_AGENT} ^pilican [OR]
#RewriteCond %{HTTP_USER_AGENT} ^Googlebot [OR]
#RewriteCond %{HTTP_USER_AGENT} ^bingbot [OR]
#RewriteCond %{HTTP_USER_AGENT} ^YandexBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^bot [OR]
RewriteCond %{HTTP_USER_AGENT} ^virusbot
RewriteRule ^(.*)$ http://no.access/
deny from 130.0.0.0/8



<Files *.rar>
deny from all
</Files>

<Files *.tar>
deny from all
</Files>

<Files *.gz.tar>
deny from all
</Files>

<Files *.zip>
deny from all
</Files>

<Files *.bz2>
deny from all
</Files>

<Files *.gzip>
deny from all
</Files>

<Files *.tar.bz2>
deny from all
</Files>



deny from 162.241.0.0/16
deny from 66.0.0.0/8





