Results 1 to 9 of 9
-
04-06-2012, 04:10 AM #1Web Hosting Master
- Join Date
- Aug 2008
- Posts
- 1,679
Best way to password protect a folder while wordpress is installed?
Hello,
I have been trying to password protect using my cpanel a folder, the problem is that wordpress 3.3.1 is installed in the root of the website and wordpress says error 403, the file page requested cannot be found. I suspect that wordpress permalink feature is causing the problem.
Any idea how I could password protect a folder even with wordpress installed using permalink?
Thank you,
Ben
-
04-06-2012, 05:10 AM #2Arbeitsloser
- Join Date
- Mar 2005
- Location
- Cardboard box
- Posts
- 1,027
I am not familiar with the cPanel function/feature, but would a simple password protection by .htaccess help?
-
04-06-2012, 05:33 AM #3Web Hosting Master
- Join Date
- Aug 2008
- Posts
- 1,679
Hi Dale,
Thanks for the reply
I tried to create and .htaccess file in the folder:
AuthUserFile /home/account_name/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic
require user password_here
and created a file called .htpasswd with the username and password.
this is what I get when I try to access the file with protection
Error 404 - Page Not Found
Admin Help: Why am i seeing this page?
This error 404 page means that for some reason the page could not be found or loaded correctly.
It maybe that your Wordpress permalink cache needs refreshing, click this link to view your admin permalink structure then come back and refresh this page.
If the error continues try checking your website link is correct in your browser window or re-creating the page from scratch.
Note: You are seeing this page because you are logged into an admin account, normal website visitors will not see this message.
Wordpress has rewrite rules in the .htaccess.How can I stop the rewrite rules for this folder? Any idea please?
I need to tell wordpress to stop trying to rewrite this url, I believe this is the problem.
Thanks,
Ben
-
04-06-2012, 07:15 AM #4Arbeitsloser
- Join Date
- Mar 2005
- Location
- Cardboard box
- Posts
- 1,027
After creating the file .htpasswd, did you run .htpasswd (the file) through htpasswd (the command) to create password?
Like this:Code:htpasswd -c .htpasswd user_here
-
04-06-2012, 08:51 AM #5Web Hosting Master
- Join Date
- Dec 2001
- Posts
- 5,221
Hi Ben:
If you are using the default .htaccess rules for WordPress, they should not cause issues with a folder underneath the WordPress root.
You can test this out by renaming the .htaccess file to something else or otherwise commenting out the .htaccess rewrite entries.
If you do find the rewrites where an issue, the rules in any .htaccess file typically follow through to folders underneath until overwritten by another .htaccess file in a folder below.
Thank you.
-
04-06-2012, 08:38 PM #6Disabled
- Join Date
- Feb 2010
- Location
- Worldwide
- Posts
- 61
Because WP runs through the index.php file password protection can be problematic.
The solution is simple and in the form of a plugin. Try the plugin below and you'll be good:
AskApache Password Protect
If this doesn't work there are a couple others you can try.
-
04-06-2012, 10:36 PM #7Web Hosting Evangelist
- Join Date
- Jul 2005
- Posts
- 489
AFAIK, wordpress rules shouldnt cause any conflicts. Try renaming wp htaccess temporarily and then add protection from cpanel and see if it works.
-
04-07-2012, 04:58 AM #8Web Hosting Master
- Join Date
- Aug 2008
- Posts
- 1,679
Thank you everyone,
I will try all your solutions and see if one of them work.
I will post back
Thank you!
Ben
-
04-08-2012, 02:23 PM #9Web Hosting Master
- Join Date
- Jan 2006
- Location
- India
- Posts
- 637
Similar Threads
-
Password protect a folder/whole external hard drive?
By DWebby in forum Computers and PeripheralsReplies: 12Last Post: 11-30-2014, 01:58 PM -
Hsphere password protect windows folder
By muhan in forum Hosting Software and Control PanelsReplies: 2Last Post: 11-12-2005, 07:08 AM -
Sending login and password to password protect dir using Php
By joshuayip in forum Programming DiscussionReplies: 5Last Post: 05-29-2005, 07:54 PM -
Looking for a good Forgot Password and Password Protect Script
By Robin Ray in forum Reseller HostingReplies: 0Last Post: 08-16-2002, 08:36 PM -
password protect a folder
By sleggtools in forum Dedicated ServerReplies: 2Last Post: 10-28-2001, 06:04 PM