內容簡介
這個外掛將會在你的部落格 HTML 的原始碼中新增一個樣式表或圖片。當瀏覽器讀取該樣式表或圖片時,會放置一個 Cookie。如果有使用者在這之後留下評論,該 Cookie 會被檢查,如果不存在 Cookie,該評論就會被標記為垃圾郵件。
此外,該外掛還可以確認使用者留下評論時所花的時間。如果太快了,那很可能是垃圾郵件機器人。一個合法的使用者要輸入他們的名字、電子郵件、網站地址並留下有思考的評論的時間有多快呢?
想要冒險的話,可以在.htaccess 文件中加入以下幾行,它會在這些垃圾郵件之進入 WordPress 之前就擋住它們。請使用你在瀏覽部落格時設定的 Cookie,替換下方的 XXXXXXXXXXXXXXXXXXX,你也可以透過檢查網頁原始碼來找到 Cookie 的值。請確定這些行被放在 WordPress 的標準規則之前。
RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
RewriteRule ^wp-comments-post.php - [F,L]
如果你使用 WordPress MU,請使用 wp-signup.php 取代 wp-comments-post.php 來擋住垃圾郵件註冊試圖。
RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
RewriteRule ^wp-signup.php - [F,L]
外掛標籤
開發者團隊
原文外掛簡介
This plugin adds a stylesheet or image to your blog’s html source code. When a browser loads that stylesheet or image a cookie is dropped. If that user then leaves a comment the cookie is checked. If it doesn’t exist the comment is marked as spam.
The plugin can also check how long it took a user to enter a comment. If it’s too fast it’s probably a spam bot. How fast can a legitimate user enter their name, email, web address and enter a well thought out comment?
For the adventurous, add these lines to your .htaccess and it will block spam attempts before they ever get to WordPress. Replace the Xs with the cookie that was set in your browser after viewing your blog. You can also find the cookie value by examining the page source code and looking for “css.php?k=XXXXXXXXXXXXXXXXXXX”. Make sure the lines go above the standard WordPress rules.
RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
RewriteRule ^wp-comments-post.php - [F,L]
If you use WordPress MU, replace wp-comments-post.php above with wp-signup.php to block spam signups.
RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
RewriteRule ^wp-signup.php - [F,L]
