The MU forums have moved to WordPress.org

No Referer check (3 posts)

  1. skcsknathan001
    Member
    Posted 14 years ago #

    Can anybody tell me should I need all of them separately or can you merge all into one?

    #http://codex.wordpress.org/Combating_Comment_Spam/Denying_Access

    #Deny Access to No Referrer Requests
    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
    RewriteCond %{HTTP_REFERER} !.*yourdomain.com.* [OR]
    RewriteCond %{HTTP_USER_AGENT} ^$
    RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L]

    #http://www.askapache.com/htaccess/htaccess.html

    #No Referer, No Comment
    #Denies any comment attempt with a blank HTTP_REFERER field, highly indicative of spam. May prevent some visitors from POSTING. [403]
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*/wp-comments-post\.php.*\ HTTP/ [NC]
    RewriteCond %{HTTP_REFERER} ^-?$
    RewriteRule .* - [F,NS,L]

    #No UserAgent, Not POST
    #Denies POST requests by blank user-agents. May prevent a small number of visitors from POSTING. [403]
    RewriteCond %{REQUEST_METHOD} =POST
    RewriteCond %{HTTP_USER_AGENT} ^-?$
    RewriteCond %{REQUEST_URI} !^/(wp-login.php|wp-admin/|wp-content/plugins/|wp-includes/).* [NC]
    RewriteRule .* - [F,NS,L]

    #Real wp-comments-post.php
    #Denies any POST attempt made to a non-existing wp-comments-post.php[403]
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*/wp-comments-post\.php.*\ HTTP/ [NC]
    RewriteRule .* - [F,NS,L]

  2. skcsknathan001
    Member
    Posted 14 years ago #

    nobody want to take a guess?

  3. kgjerstad
    Member
    Posted 14 years ago #

    Hmmmm... that would be great. :-)

About this Topic

  • Started 14 years ago by skcsknathan001
  • Latest reply from kgjerstad