Home › Forums › BulletProof Security Pro › htpasswd password protected directory 404 Error
- This topic has 3 replies, 2 voices, and was last updated 13 years ago by
AITpro Admin.
-
AuthorPosts
-
Jan
ParticipantHi,
I tried to secure a non-wp folder with htpasswd and htacces but when I access the url to this folder I do not get a login request for this folder.
Instead I get a 404 not found error. Do I have to make an adjustment in Bulletproof to make this work?AITpro Admin
KeymasterWhat is the folder structure and .htaccess files related to your folder structure?
Example:
My WordPress site is a root installation here: /website-root-folder or my site is a subfolder installation /my-wordpress-site-subfolder.
My password protected folder is here: /some-folder
htaccess files related to this structure are:
There is an .htaccess file is in the website root folder which affects subfolders recursively so it will affect and/or override my password protected directory .htaccess file.This is the most common problem scenario above and to fix problems with password protected .htaccess file is to add ErrorDocument 401 default to your root .htaccess file.
ErrorDocument 400 /wp-content/plugins/bulletproof-security/400.php ErrorDocument 401 default ErrorDocument 403 /wp-content/plugins/bulletproof-security/403.php ErrorDocument 404 /404.php
Jan
ParticipantHi,
Perfect! After putting the ErrorDocument 401 in the root htaccess the login appears as it should.
Thanks for the swift solution.AITpro Admin
KeymasterGreat! Thanks for confirming that this took care of the issue.
This code will be a permanent code addition in the next version release of BPS. I keep meaning to add this to the autoupdate .htaccess function, but it tends to get forgotten. 😉 The autoupdate will check to see if this code already exists. If it does not then it will be automatically added so in your case since you already added it then the autoupdate function will not add it again to your root .htaccess file.
-
AuthorPosts
- You must be logged in to reply to this topic.



