WordPress.org

Forums

[resolved] [Plugin: BulletProof Security] Add text above version number in secure.htaccess (10 posts)

  1. icing
    Member
    Posted 2 years ago #

    #   BULLETPROOF .47.1 >>>>>>> SECURE .HTACCESS     
    
    # If you edit the  BULLETPROOF .47.1 >>>>>>> SECURE .HTACCESS text above
    # you will see error messages on the BPS Security Status page
    # BPS is reading the version number in the htaccess file to validate checks
    # If you would like to change what is displayed above you
    # will need to edit the BPS /includes/functions.php file to match your changes

    I would like to add some text to secure.htaccess on top. How do I edit functions.php to allow me to do that?

    [ Please do not bump, it's not permitted here. ]

  2. AITpro
    Member
    Posted 2 years ago #

    This comment was not posted in the BPS plugin support area/Forum. I found this comment doing a general internet search. Please post all future questions in the BPS plugin support area/Forum.

    http://wordpress.org/support/plugin/bulletproof-security

    As of BPS .47.2 the check above has become much more complex and an WP Dashboard Admin notice has been added, but you can comment out the admin notice by commenting out this line of code.
    Code line 202 in /bulletproof-security/includes/functions.php

    add_action('admin_notices', 'root_htaccess_status_dashboard');

    To remove the check for the BPS version number.
    Code line 256 function root_htaccess_status() and replace the version number check with whatever you would like to replace it with.

  3. icing
    Member
    Posted 2 years ago #

    Thanks for your reply. Sorry for posting in the wrong section. Didn't know this subforum existed. Will post here from now on.

    By comment out, you mean removing this action by adding "//" before code line 202?

    How do I go about editing code line 256? Please elaborate.

    Thanks

  4. AITpro
    Member
    Posted 2 years ago #

    No need to apologize. I was just trying to let you know that i check the BPS plugin forum hourly so i can answer folks questions as quickly as possible. Your question was posted and floating around in WP tag no mans land for a month without being answered. ;) I just happened to stumble across it while looking for something else.

    Yes, by adding // in front of add_action you will stop the entire root_htaccess_status_dashboard function from being called, which means the WP dashboard alert will not be displayed.

    Depends on what you are trying to do exactly. Please post details about what exactly you want to do and I can then tell you exactly how to modify the code.

  5. icing
    Member
    Posted 2 years ago #

    I am also using WP Better Security in conjunction with Bulletproof Security. Now, the other plugin likes to add its code in .htaccess on top.

    # BEGIN Better WP Security
    ...
    ...
    ...
    # END Better WP Security
    
    #   BULLETPROOF .47.3 >>>>>>> SECURE .HTACCESS

    This causes the status of Bulletproof Security Plugin to show

    Additional Website Security Measures
    The WP readme.html file is not .htaccess protected

    I guess nothing is broken functionality wise, correct me if I am wrong.

    Another option for me is to edit secure.htaccess within the folder
    /public_html/wp-content/plugins/bulletproof-security/admin/htaccess to add the Better WP Security code below BPS' code.

    This is the reason I need to edit functions.php.

  6. AITpro
    Member
    Posted 2 years ago #

    Yes, this is a known problem with that plugin. The wp better security plugin is adding its .htaccess code to the top of the root .htaccess file instead of appending its code to the bottom of the root .htaccess file. This also causes a problem for WPSC.

    See this thread >>> http://wordpress.org/support/topic/plugin-bulletproof-security-forbidden-access-wp-loginphp-on-this-server?replies=21

    Solution: cut the wp better security .htaccess code out of your root .htaccess file and paste it into the the BPS Custom Code bottom text box for your Root .htaccess file (save it, click the AutoMagic buttons and Activate BulletProof Modes again). If you are using the WPSC plugin this should also fix the problems with WPSC caching not working correctly when using wp better security.

  7. icing
    Member
    Posted 2 years ago #

    Thank you for the solution above. I have added BWPS code in Custom Code bottom. Also added image hotlinking protection below that. Yeah the WPSC plugin error is gone now too and I have activated mod_rewrite mode in it now and updated .htaccess from WPSC.

    The security status is now all green. Thanks for your time and effort. Really appreciate it.

    I have also gone through that thread posted by you above and found it most relevant to my problem and had insightful information regarding BWPS.

  8. icing
    Member
    Posted 2 years ago #

    Before cutting the Better WP Security code from Root .htaccess and pasting in Custom Code Bottom, I had disabled Server Tweaks in Better WP Security. These tweaks are already built in BPS. AITPro wrote about it in the other thread linked above.

    This is for those who have similar problem.

  9. icing
    Member
    Posted 2 years ago #

    Latest update is that I have had to remove Better WP Security as I couldn't reach the WordPress login page with the earlier setup. Mind you, the login page's URL was not default and had been modified using BWPS.

    Restoring older versions of htaccess didn't help. Then deleted BPS and BWPS via ftp, only then could I reach the login page. Re-installed BPS and configured WPSC rules.

    Time to download another backup.

  10. cscottb
    Member
    Posted 1 year ago #

    I'm just bumping this because I had the same thing happen.

    The WP readme.html file is not .htaccess protected (In red)

    I didn't know about the conflict with WP Security at that point, so I added some code to protect the file that I found on another site. It didn't work.

    But getting that Better WP Security entry to the bottom of the .htsccess file (where it belongs anyway) is the key. This is a better solution for me than using the Custom Code section of BPS.

    After reactivating the BulletProof Modes again, I'm seeing nothing but green.

Topic Closed

This topic has been closed to new replies.

About this Topic