Blocking IP address and url

Fix it!!

Blocking IP address and url

Postby slobjones » Sat Mar 15, 2008 1:02 pm

I want to block the hacker who invaded my site today, by IP address and url (the site where he's posting about his successes).

Here's what I have so far. Do I need to clean this up?

Thanks.

Code: Select all
# block visitors referred from indicated domains
RewriteEngine on
RewriteCond %{HTTP_REFERER} badsite\.com [NC,OR]
RewriteRule .* - [F]

# allow all except those indicated here
<Files *>
order allow,deny
allow from all
deny from xx.xxx.xx.xxx
</Files>
slobjones
 
Posts: 32
Joined: Sat Dec 29, 2007 2:56 pm

Postby slobjones » Sat Mar 15, 2008 1:54 pm

Seems this portion is blocking all access to my site! Any idea how I can correct the error so only the bad referring address is blocked?
Code: Select all
# block visitors referred from indicated domains
RewriteEngine on
RewriteCond %{HTTP_REFERER} badsite\.com [NC,OR]
RewriteRule .* - [F]
slobjones
 
Posts: 32
Joined: Sat Dec 29, 2007 2:56 pm

Postby richardk » Sun Mar 16, 2008 10:55 am

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_REFERER} badsite\.com [NC]
RewriteRule .* - [F,L]

Order Allow,Deny
Allow from all
Deny from xxx.xxx.xxx.xxx
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby slobjones » Mon Mar 17, 2008 2:30 pm

Thank you, richardk!
slobjones
 
Posts: 32
Joined: Sat Dec 29, 2007 2:56 pm


Return to Security with Mod_Rewrite

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest

cron