BulletProof Security
[resolved] Can't not create master htaccess file (19 posts)

  1. finddarkpoet
    Posted 2 years ago #

    Whenever I click on Create secure.htaccess File, it directs to http://mywebsite.com/wp-admin/admin.php?page=bulletproof-security/admin/options.php, and this is a 404 page.

    What's the problem here?


  2. AITpro
    Plugin Author

    Posted 2 years ago #

    Are you using php/php.ini handler code in your current root .htaccess file?
    Have you created a Custom Permalink Structure?
    Does your web host have cPanel?

    If none of the things above are the issue/problem then post this information about your site. You will find this on the BPS System Info tab page.
    WordPress Installation Folder:
    WordPress Installation Type:
    WP Permalink Structure:
    PHP Version Check:

    DNS Name Server:
    Server Type:
    Operating System:
    Server API:

  3. finddarkpoet
    Posted 2 years ago #

    Hi, I don't have any handler code in my .htaccess file, I do use php.ini.

    I don't have the F-lock thing in my Hotlink protection in cPanel.

    It did work before, on the same server. But I lost track with what changes have been made to cause this.

    Here's the info:

    WordPress Installation Folder: /
    WordPress Installation Type: Root Folder Installation
    Network/Multisite: Multisite is Not enabled

    WP Permalink Structure: /%category%/%postname%.html
    Permalinks Enabled: √ Permalinks are Enabled
    PHP Version Check: √ Using PHP5

    DNS Name Server: rob.ns.cloudflare.com
    Server Type: Apache Webserver
    Operating System: Linux
    Server API: cgi - Your Host Server is using CGI.

    Many thanks!

  4. AITpro
    Plugin Author

    Posted 2 years ago #

    Here is the problem.

    Your are using the .html permalink hack. Years ago some marketer claiming to know something about SEO said that this would somehow magically boost your SEO rankings up. That is total BS. This BS was then copied and spread all over the Internet. Remove the .html hack from your permalink structure to fix the problem - /%category%/%postname%/

    Cause of the Problem: WP Permalink Structure: /%category%/%postname%.html

  5. finddarkpoet
    Posted 2 years ago #

    Hi, thanks for the reply. I've changed the permalink structure to /%category%/%postname%/ , and I also had a plugin ".html pages", I've also deactivated it and removed it.

    Now all my permalinks to pages and posts are working fine as usual, but I still can't create the secure .htaccess file. Same error, 404.

  6. AITpro
    Plugin Author

    Posted 2 years ago #

    Hmm odd. Try clearing your Browser cache and if you have a caching plugin clear that cache as well.

    Also you mentioned cPanel so if you are using or even if you are not using (disable / enable is also broken for the HotLink Protection Tool) the HotLink Protection Tool it could be the cause of the problem. I should have had you check this first actually.


  7. finddarkpoet
    Posted 2 years ago #


    I've cleaned the cache, and I've disabled HotLink Protection Tool (and also made sure there's nothing like you described in the post).

    Error still occurs. I guess it could be a conflicting plugin.

  8. finddarkpoet
    Posted 2 years ago #

    It seems like all the sites on my server have the same issue. It used to work just fine, now must be from my php.ini setup or root .htaccess file.

    What could it be?

  9. AITpro
    Plugin Author

    Posted 2 years ago #

    You cannot disable the cPanel HotLink Protection Tool - the disable option for that tool is also broken. Are you able to lock your root .htaccess file? If so, then lock it to prevent the HotLink Protection Tool from being able to wipe out the root .htaccess file code.

    If you think it might be related to your php.ini file then temporarily rename it for testing.

    Try creating new .htaccess files with AutoMagic and activating BulletProof Modes again.

  10. finddarkpoet
    Posted 2 years ago #

    In my root .htaccess, not the one in public_html, here's the code:

    <Files .htaccess>
    order allow,deny
    deny from all

    # Use PHP5 as default
    #AddHandler application/x-httpd-php5 .php

    I've removed the php.ini and switched to default .htaccess manually inside public_html, which is my site's root folder, it still didn't work. Tried with a few clean wordpress installs.

    Same result. I'm very confused right now.

  11. AITpro
    Plugin Author

    Posted 2 years ago #

    Which web host do you have?
    Are you sure the php/php.ini handler is correct for your particular web host?

    Have you tried deleting the root .htaccess file for one of your sites and then going to the WordPresss Settings >>> Permalinks page and resaving your custom permalink structure?

  12. AITpro
    Plugin Author

    Posted 2 years ago #

    What is the latest status of this issue/problem?

  13. finddarkpoet
    Posted 2 years ago #

    Hi, i'm still struggling.

    I'm using Lunarpages, and I'm sure the BPS plugin worked just fine before, but I've lost track what I did that has caused this issue.

    My server requires the .htaccess to enable PHP 5, so I can't delete it. But I've tried to only keep the line to enable php5 and default lines that come with the default wordpress install, resaved the Permalinks in Settings, and it still did not work.

  14. AITpro
    Plugin Author

    Posted 2 years ago #

    To enable php5 see this Lunarpages help post: http://wiki.lunarpages.com/Enable_PHP_5

    Lunarpages help post:

    To add/use php/php.ini handler code the Lunarpages php/php.ini handler code for your root .htaccess file is:

    suPHP_ConfigPath /home/xxxxxx/public_html

    You can add this php.ini handler code the TOP box on the BPS Custom Code page and create a new secure.htaccess Master .htaccess file with AutoMagic and Activate BulletProof Mode for your Root folder. Replace the x’s with your actual account name in the php.ini handler code – You will find your account name under the BPS System Info page.

    Source: http://www.ait-pro.com/aitpro-blog/2853/bulletproof-security-pro/php-ini-general-and-host-specific-php-ini-information-for-bps-pro/#lunarpages-host

  15. finddarkpoet
    Posted 2 years ago #

    Hi, I did what you suggested, the problem is, the AutoMagic just does not work. I still can't create secure.htaccess with it.

    So copied the secure.htacess codes from Edit/Upload/Download section and manually pasted into my .htaccess, and also added the Lunarpages phpini handler code and php5 enabler code in it. Then Activate Root folder bulletproof mode, it says the the mode is activated. But when I refresh the page, both backend and frontend got errors, indicated that it's not running in php5. So I found that, after the activation, all the lunarpages phpini handlers are gone. I just pasted those codes into the file again and saved. The site is working, and looks like it's running in Bulletproof mode.


    The htaccess file that is activated in your root folder is:

    √ wp-config.php is htaccess protected by BPS
    √ php.ini and php5.ini are htaccess protected by BPS

    √ Deny All protection activated for BPS Master /htaccess folder
    √ Deny All protection activated for /wp-content/bps-backup folder

    The htaccess file that is activated in your wp-admin folder is:

    All in all, I have to make it work in this way and AutoMagic is still not working for me.

  16. AITpro
    Plugin Author

    Posted 2 years ago #

    Wow rough road for you. Sorry about that. If you use the BPS Custom Code feature then you would add your php/php.ini handler code in the top box, save it, then click the AutoMagic button and activate BulletProof Mode. This way your php/php.ini handler code is ALWAYS included in your root .htaccess file.

    But if you are saying that you literally cannot get the AutoMagic buttons to work than something on your website is blocking file writing and the most likely cause would be that you have set permissions too restrictive on folders or you have ownership permissions that need to be changed. I see that your API displays CGI, but what you are describing is what happens for folks who have DSO. Those folks need to either change file and folder permissions or change ownership permissions.

  17. AITpro
    Plugin Author

    Posted 2 years ago #

    Or the most obvious thing DOH!. I should have caught this right away. If you do not have the Lunarpages php/php.ini handler in the .htaccess file already before you click the AutoMagic buttons then yeah this will cause a 404 error. ;)

  18. finddarkpoet
    Posted 2 years ago #

    Thanks for the follow up. I will dig a bit further since I want to get to the bottom of this.

    Because it really did work just fine.

    I will keep this post updated.

  19. AITpro
    Plugin Author

    Posted 2 years ago #

    @finddarkpoet - Cool. I am going to resolve this Thread, but I will still receive email notifications if you update the Thread so yep update the Thread with any new info you find out on this issue. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.