[Resolved] Can't not create master htaccess file
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?
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:
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.
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
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.
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.
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.
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?
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.
In my root .htaccess, not the one in public_html, here’s the code:
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.
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?
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.
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:
# LUNARPAGES PHPINI HANDLER CODE
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.
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:
BULLETPROOF .48 >>>>>>> SECURE .HTACCESS
√ 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:
BULLETPROOF .48 WP-ADMIN SECURE .HTACCESS
All in all, I have to make it work in this way and AutoMagic is still not working for me.
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.
- The topic ‘[Resolved] Can't not create master htaccess file’ is closed to new replies.