Forum Moderators: phranque
<Files .htaccess>
order allow,deny
deny from all
</Files>
IndexIgnore */*
RewriteCond %{HTTP_HOST} ^www.website.com$
RewriteRule ^/?$ [website.comm...] [R=302,L]
ErrorDocument 404 [website.com...]
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !website.com [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteCond %{HTTP_REFERER} !yahoo\. [NC]
RewriteCond %{HTTP_REFERER} !bing\. [NC,OR]
RewriteRule \.(jpg|jpeg|png|gif|jpe|bmp|swf)$ [website.com...] [NC,R,L]
RewriteRule ^(.*)width=(.*)$ [website.com...] [R=301,nc,L]
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^BadBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^EvilScraper [OR]
RewriteCond %{HTTP_USER_AGENT} ^FakeUser
RewriteRule ^(.*)$ [go.away...]
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://.*somebadforum\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*example\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*lastexample\.com [NC]
RewriteRule .* - [F]
order allow,deny
deny from 192.168.44.201
deny from 224.39.163.12
deny from 172.16.7.92
allow from all
I'm not too good with this and I don't know how add multiple "rewrite engine on " and other stuff, I really dont know how merge all this things together.
Can you give some thelp how to make this to work properly ?
Thanks,
Macas
IndexIgnore */*
Options +FollowSymLinks
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
order allow,deny
deny from 224.39.163.12
deny from 172.16.7.92
# Block those annoying people, by denying a whole range of IP addresses.
deny from 192.168.
deny from 10.0.0.
# Block by country - COUNTRY_BLOCK_START
deny from 67.212.160.0/24
deny from 80.247.139.0/24
allow from all
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
#get rid of bad bots,Evil Scraper, hijackers
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^(BadBot|EvilScraper|FakeUser) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(BadBot|EvilScraper|FakeUser) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(BadBot|EvilScraper|FakeUser) [NC]
RewriteRule ^(.*)$ [go.away...]
#get rid of nasty websites
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://.*somebadforum\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*example\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*lastexample\.com [NC]
RewriteRule .* - [F]
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^/?$ http://example.com [R=302,L]
#Preventing hot linking of images and other file types
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !example.com [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteCond %{HTTP_REFERER} !yahoo\. [NC]
RewriteCond %{HTTP_REFERER} !bing\. [NC,OR]
RewriteRule \.(jpg|jpeg|png|gif|jpe|bmp|swf|css|js)$ http://example.com [NC,R,L]
RewriteRule ^(.)width=(.)$ http://example.com/ [R=301,nc,L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to notfound.html, and everything works as normal.
ErrorDocument 404 http://example.com/notfound.html
</IfModule>
ErrorDocument 404 http://example.com/notfound.html
IndexIgnore */*
Options +FollowSymLinks
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
order allow,deny
deny from 224.39.163.12
deny from 172.16.7.92
# Block those annoying people, by denying a whole range of IP addresses.
deny from 192.168.
deny from 10.0.0.
# Block by country - COUNTRY_BLOCK_START
deny from 67.212.160.0/24
deny from 80.247.139.0/24
allow from all
RewriteEngine on
RewriteBase /
#get rid of bad bots,Evil Scraper, hijackers
RewriteCond %{HTTP_USER_AGENT} ^(BadBot|EvilScraper|FakeUser) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(BadBot|EvilScraper|FakeUser) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(BadBot|EvilScraper|FakeUser) [NC]
RewriteRule ^(.*)$ [go.away...]
#get rid of nasty websites
RewriteCond %{HTTP_REFERER} ^http://.*somebadforum\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*example\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*lastexample\.com [NC]
RewriteRule .* - [F]
# Redirect from www
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^/?$ http://example.com [R=302,L]
#Preventing hot linking of images and other file types
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !example.com [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteCond %{HTTP_REFERER} !yahoo\. [NC]
RewriteCond %{HTTP_REFERER} !bing\. [NC,OR]
RewriteRule \.(jpg|jpeg|png|gif|jpe|bmp|swf|css|js)$ http://example.com [NC,R,L]
RewriteRule ^(.)width=(.)$ http://example.com/ [R=301,nc,L]
ErrorDocument 404 http://example.com/notfound.html