Need help with htaccess for blocking access by user-agent

umerjutt00

Elite Member
Joined
Oct 28, 2011
Messages
4,373
Reaction score
2,493
A website is using some kind of auto-blogging plugin to steal all the content from my site. After looking at the logs, I have found the user-agent being used:

WordPress/4.5.2; http://website.com


Let's say website.com is the site which is stealing my content.

How do I block it with htaccess?
 
You could use something like this (which might also affect other connections from WP instances):

Code:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} WordPress [NC]
RewriteRule .* - [F,L]

That said user agent is super easy to change, so it's a better idea to block by IP.
 
Back
Top