WordPress.org

Ready to get started?Download WordPress

Forums

BulletProof Security
[resolved] Update Reset my .htaccessfile (2 posts)

  1. umarnasir
    Member
    Posted 2 years ago #

    I have been using BPS for awhile.
    I have had eddited my .htaccessfile to block a few websites It work for the longest time but the recent update changed that. Now when i go back to add to code it doesnt block them anymore. I dont recall where i should add the code to make it work.

    RewriteEngine on
    # Options +FollowSymlinks
    RewriteCond %{HTTP_REFERER} example.blogspot\.ca[NC]
    RewriteRule .* - [F]

    http://wordpress.org/extend/plugins/bulletproof-security/

  2. AITpro
    Member
    Plugin Author

    Posted 2 years ago #

    You can add your custom code to the Bottom Custom Code box to save it permanently, then create new Master .htaccess files with AutoMagic and then Activate BulletProof Mode for your Root folder.

    You only need this code without RewriteEngine On or Options...
    the backslash is important - it is used to escape the dot ( . ). The dot is a special character that means something in .htaccess code so if you want the literal dot to be just a dot then you have to add a backslash.

    RewriteCond %{HTTP_REFERER} subdomain\.blogspot\.ca [NC]
    RewriteRule .* - [F]

    if you have more sites you want to block then you would add them like this. You will need to use OR except for the last line of code before the RewriteRule.

    RewriteCond %{HTTP_REFERER} badsite\.com [NC,OR]
    RewriteCond %{HTTP_REFERER} another-badsite\.com [NC,OR]
    RewriteCond %{HTTP_REFERER} really-badsite\.com [NC]
    RewriteRule .* - [F]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic