WordPress.org

Ready to get started?Download WordPress

Forums

Cookies for Comments
[resolved] Can this functionality be added to registration pages? (10 posts)

  1. If this could catch and stop people trying to register to a site, it would be fantastic. On MultiSite and BuddyPress sites, that's becoming more and more of an issue :)

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

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    You can already use it. I included rewrite rules in the docs to protect wp-signup.php so you could use the same technique with any other registration page.

  3. Hmm. Okay. register is the default slug for BuddyPress registration pages. So this would be right.

    RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
        RewriteRule ^register - [F,L]

    I'm assuming that the the k= that I should grab from css.php?k=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&o=i&t=XXXXXXXXX should only be the stuff BEFORE amp;o=i&t=XXXXXXXXX

    We'll try that for a few days ;)

  4. valuser
    Member
    Posted 3 years ago #

    Re: the above.

    1) Is it just the the stuff before the & ?

    2) How did this work out ?

    RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
        RewriteRule ^register - [F,L]

    3) If the BuddyPress installation is on a subsite is there any change to

    RewriteRule ^register - [F,L]

    my register page is http://examplesite.com/subsite3/register

    4) Where to put the code ?

    before or after RewriteEngine On

    My htaccess begins

    # Use PHP5 Single php.ini as default
    AddHandler application/x-httpd-php5s .php

    # BEGIN WordPress
    RewriteEngine On

    Really hope this is working and would greatly appreciate advice when time permits.

  5. 1) Yes, it's just the K stuff.

    2) Worked GREAT! :D

    3) Sure, change ^register to ^subsite\register

    4) I did this:

    # Use PHP5 Single php.ini as default
    AddHandler application/x-httpd-php5s .php
    
    # 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
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    ....
    </IfModule>
    # END WORDPRESS

    The other stuff, with the lmgtfy link is to say 'If you're submitting data to my register page and you DID NOT come from my domain, then you're not using my form, which means you, sir, are a spammer. Good day. I SAID GOOD DAY!'

  6. valuser
    Member
    Posted 3 years ago #

    Many, many thanks.

    Does this make captchas and blockers unnecessary ??

  7. Captchas yes. I haven't used one for ages.

    Blockers... No. You'll always need some sort of blocker. I use Bad Behavior, personally, and a nifty firewall on my server. But this should significantly slow the little one eyed bastards down.

  8. valuser
    Member
    Posted 3 years ago #

    Brilliant. Thanks for the advice.

  9. valuser
    Member
    Posted 2 years ago #

    Revisiting this just to be sure, to be sure . When time permits - re the above

    3) Sure, change ^register to ^subsite\register

    So change

    RewriteRule ^register - [F,L] to RewriteRule ^subsite\register - [F,L] (i.e with a backward slash)

    What about the line

    RewriteCond %{REQUEST_URI} .register* ?

    Thanks

  10. You may need to change that. It'd be a test'n'see for me.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic