Unfortunately, I've come across a lot of idiotic people who think it is fun to spam. So I've used .htaccess to block their IP's and hosts. But there is a certain guy who is a forum spammer so I thought it'd be funny to redirect him to google.com when he types in the URL to my site's forum. So how would I go about redirecting him to google.com with .htaccess?
.htaccess redirect?
Started by Woe, Jun 30 2006 05:50 PM
2 replies to this topic
#1
Posted 30 June 2006 - 05:50 PM
#2
Posted 01 July 2006 - 01:20 AM
RewriteCond %{REMOTE_ADDR} 000.000.000.000
RewriteRule .* http://google.com[F,L]
That would be my best guess. I use something similar in my .htaccess to prevent e-mail harvesting bots. Although, as i've never really tested it, i can't say how well it would work.You can also stack conditions.
i.e.
RewriteCond %{REMOTE_ADDR} 000.000.000.000
RewriteCond %{REMOTE_ADDR} 000.000.000.001
RewriteRule .* http://google.com[F,L]
#3
Posted 04 July 2006 - 01:24 AM
Thanks. I'll give it a try.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
