View Single Post
Old 08-05-2015, 05:37 PM  
Bladewire
StraightBro
 
Bladewire's Avatar
 
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,229
Quote:
Originally Posted by robwod View Post
Bladewire, you may be better off redirecting to a 401 or 403 as wordpress generates a 404 page on its own, and thus, still makes queries (unless it's a cached page of course).
Great point

If it's the xmlrpc being queried do you thing the below might be the lease CPU intensive while still protecting the site?

Code:
<FilesMatch "^(wp-trackback|xmlrpc)\.php$">
Order Deny,Allow
Allow from 68.5.209.235
Deny from all
</filesMatch>

RedirectMatch 403 ^.*/wp-admin/*$
On a side note: Since I don't have a feed anyone needs to read, part of the code I use for scrapers is this

Code:
RewriteCond %{REQUEST_URI} ^/feed$ [OR] 
RewriteCond %{REQUEST_URI} ^/comments/feed$ [OR]
RewriteCond %{REQUEST_URI} ^/wp-includes/wlwmanifest.xml$
RewriteCond %{HTTP_HOST} ^MYSITE.COM
RewriteRule ^(.*) http://www.npr.org/rss/$1 [P]
__________________


Skype: CallTomNow

Bladewire is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote