How to RickRoll WordPress Spammers

I have a very persistant spammer who just doesn’t seem to get the message that I won’t be authorising his comment spam. I could have quietly blocked him, or kept deleting his spam. or even try to educate him. Instead I just decided to have a little fun of my own. I didn’t think too long about it and just decided to RickRoll him.

I popped this in my .htaccess file.

RewriteCond %{REMOTE_ADDR} ^92\.241\.160\.22$
RewriteRule .* http://www.youtube.com/watch?v=oHg5SJYRHA0 [R,L]

I hate this song and thought why not 🙂 Whenever he comes to my site he will get rickrolled.

Update:

2 more visits (failed) with a redirect to Rick Gastleys song. Success.

Update 2:

2 more spams from an ip address 3 up from the previous one. I have changed the RegExp from ^92\.241\.160\.22$ to ^92\.241\.160\.[0-9]{1,3}$ to capture the whole ip range. All the Spam I have had so far seem to be for Russian sites.

1 Trackback / Pingback

  1. Spammers rack off « RockertO

Leave a Reply

Your email address will not be published.


*