Mobile app version of vmapp.org
Login or Join
Kristi941

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

@Kristi941

Posted in: #Hotlinking #Htaccess #Images #Spam #Wordpress

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Kristi941

1 Comments

Sorted by latest first Latest Oldest Best

 

@Twilah146

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?

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme