Hi fellows,
I wanted to share this link with you, if you are struggling in the setup of your wordspress or just curios about which other features WordPress might have, the check out this link:
Stupid WordPress Tricks ? Perishable Press
This guy has been around for several years and seems to know WordPress very well.
The above is what I just used on my blog... hope you enjoy.
I wanted to share this link with you, if you are struggling in the setup of your wordspress or just curios about which other features WordPress might have, the check out this link:
Stupid WordPress Tricks ? Perishable Press
This guy has been around for several years and seems to know WordPress very well.
As explained in my article, denying access to no-referrer requests, you can greatly reduce the number of spam comments by eliminating all direct requests for your blog’s comments-post.php file. This will block automated spam scripts from bypassing your comments form by hitting the comment processing script directly. Here are two ways to block no-referrer comment requests, one uses HTAccess and the other uses PHP. Here is the HTAccess method:
Code:
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post.php
RewriteCond %{HTTP_REFERER} !domain.tld [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L][/PHP]
Place that code in your site’s root HTAccess file and edit the “domain.tld” to match your own domain. Once in place, this code will redirect any request for your blog’s comments-post.php file that didn’t originate from your site back to the URL from whence it came.
This may also be accomplished via PHP. Place the following function in your theme’s functions.php file:
PHP:
function check_referrer() {
if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == '') {
wp_die(__('Please do not access this file directly.'));
}
}
add_action('check_comment_flood', 'check_referrer');
The above is what I just used on my blog... hope you enjoy.