WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Cookies for Comments] Can this functionality be added to registration pages?

[Resolved] [Plugin: Cookies for Comments] Can this functionality be added to registration pages?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Donncha O Caoimh

    @donncha

    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.

    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 😉

    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.

    1) Yes, it’s just the K stuff.

    2) Worked GREAT! 😀

    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!’

    Many, many thanks.

    Does this make captchas and blockers unnecessary ??

    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.

    Brilliant. Thanks for the advice.

    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

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] [Plugin: Cookies for Comments] Can this functionality be added to registration pages?’ is closed to new replies.