WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Cookies for Comments] CFC htaccess Trick Not Working (6 posts)

  1. ljmac
    Member
    Posted 5 years ago #

    Hi Donncha,

    First of all, thanks for the great plug-ins! (I use CFC, WordPress Hashcash and WP-SuperCache, which I think is an essential plug-in!)

    Anyway, I added your htaccess code to block spam before it even reaches WordPress, but when I tested it, I found that WordPress still recorded the comment as spam (and I found it was in the database). I'm sure I've got the cookie code correct, but what I think may be the problem is that my blog does not reside in the root directory of my site. Do I have to put in the blog directory ahead of "wp-comments-post.php" in the code perhaps?

  2. Donncha O Caoimh
    Member
    Posted 5 years ago #

    The rules should go into the same htaccess where your WordPress rules are, usually. That should be in the directory where wp-comments-post.php is, but you can change the rewrite rules to point at the wp-comments-post.php if required.

  3. ljmac
    Member
    Posted 5 years ago #

    Hi donncha,

    That's exactly where it is, as per your instructions (before the WordPress rewrite rules, right?).

    Perhaps I am misunderstanding the way it works. I was expecting to see nothing of spam blocked by .htaccess. Is my assumption correct, or does it still get recorded as spam if I have CFC set to "Spam"?

  4. Donncha O Caoimh
    Member
    Posted 5 years ago #

    The .htaccess rules should block the spam ever before it gets to your blog. I'm not sure why they don't work for you, sorry.

  5. ljmac
    Member
    Posted 5 years ago #

    My blog resides in the subdirectory "english" - how would I modify it to point directly to my WordPress directory? I tried the obvious /english/wp-comments.php but that didn't work either.

    I assume I must have the cookie code correct, otherwise I can only imagine no one would be able to comment!

    The only other possibilty I can see is some kind of conflict with AskApache Password Protect's rewrite rules (these are placed after the WordPress rewrite rules by that plug-in).

  6. ljmac
    Member
    Posted 5 years ago #

    Actually Donncha, I just thought of something that could solve my problem, and make life a lot easier for everyone: why not add an option to CFC to add the right htaccess code automatically, just as WP-SuperCache does for example?

Topic Closed

This topic has been closed to new replies.

About this Topic