I have a WordPress website which accepts anonymous comments and images. We are receiving spam in the form of Russian porn, with images hotlinked from websites on the Russian domain .ru

As we are unlikely to ever need to legitimately link to a Russian picture, I thought the easiest way to not have to look at this in the spam folder would be to use .htaccess to redirect any image on an .ru domain to something that doesn't exist.

Is this possible? What would I need to add to my .htaccess?


You can't do that with .htaccess, as requests for those images don't come from your server. Instead write a filter on your comments that either checks for .ru and then blocks the comment, or use someone elses code to filter comments.

The Askimet plugin is pretty good at preventing spam – have you got that installed?

| improve this answer | |
  • We will be trialling the Akismet plugin soon, and I already have a filter that makes those entries go into 'Spam', but I wanted to make it so even if you're looking in the 'spam' folder, you don't see the pictures. – Shaun May 12 '11 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.