WordPress.org

Ready to get started?Download WordPress

Forums

Cookies for Comments
Adapt for BP Multi-Network Anti Splog ????? (1 post)

  1. valuser
    Member
    Posted 2 years ago #

    Just about a year ago Ipstenu (Mika Epstein) kindly showed us how to use this plugin as an anti splog device in a buddypress set-up.

    see http://wordpress.org/support/topic/plugin-cookies-for-comments-can-this-functionality-be-added-to-registration-pages?replies=10

    # BEGIN ANTISPAMBLOG REGISTRATION
    <IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteCond %{HTTP_COOKIE} !^.*xxxxxxxxxxxxxxxxxxxxxxxxxxx.*$
     RewriteRule ^register - [F,L]
    
     RewriteCond %{REQUEST_METHOD} POST
     RewriteCond %{REQUEST_URI} .register*
     RewriteCond %{HTTP_REFERER} !.*domain.com.* [OR]
     RewriteCond %{HTTP_USER_AGENT} ^$
     RewriteRule (.*) http://lmgtfy.com/?q=spammer [R=301,L]
    </IfModule>
    # END ANTISPAMBLOG REGISTRATION

    It works.

    Now in a multi-network set-up, and where you want registrations to come via specific networks, there will be a different cookie for each network.

    Now

    # BEGIN ANTISPAMBLOG REGISTRATION
    <IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteCond %{HTTP_COOKIE} !^.*xxxxxxxxxxxxxxxxxxxxxxxxxxx.*$
     RewriteRule ^register - [F,L]
    
     RewriteCond %{REQUEST_METHOD} POST
     RewriteCond %{REQUEST_URI} .register*
     RewriteCond %{HTTP_REFERER} !.*location1.domain.com.* [OR]
     RewriteCond %{HTTP_USER_AGENT} ^$
     RewriteRule (.*) http://lmgtfy.com/?q=spammer [R=301,L]
    </IfModule>
    # END ANTISPAMBLOG REGISTRATION

    works for location 1.

    But How to add for location2, location 3 etc ?

    I tried repeating <IfModule mod_rewrite.c> new cookie and new location </IfModule> but it crashed the site.

    Any ideas really appreciated.

    http://wordpress.org/extend/plugins/cookies-for-comments/

    [ Please do not bump, that's not permitted here. ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic