Support » Plugin: Contact Form 7 » Adding Contact Form 7 to my anti-spam rules in .htaccess

  • I have the following in my .htaccess to block spam. It works by not allowing anything to login, register, or make a comment unless the conditions are met. It works, but I would like to add Contact Form 7 (version 3.2) in there somehow.

    RewriteCond %{HTTP_COOKIE} !^PHPSESSID=\w+ [OR]
    RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?example\.com/ [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} ^$
    RewriteRule ^wp-(comments-post|login|register)\.php http://example\.com [R=301,L,NS]

    I’ve tried using wp-contact-form-7.php and submit.php. I’ve also tried using the uri /contact-us/ where the contact form is located and none work.

    I’d appreciate any help, even if it only points me in the right direction. Thanks.

  • The topic ‘Adding Contact Form 7 to my anti-spam rules in .htaccess’ is closed to new replies.