editor Posted August 25, 2008 Posted August 25, 2008 I'm trying to protect a directory with a password through cPanel using .htaccess. I followed the tutorial provided in cPanel and thought that I had done everything correctly. However, I now find that I'm routinely receiving multiple prompts for username and password. In other words, when I try to access the directory, I'm prompted to enter my username and password. I do so and hit enter, only to receive another such prompt. Sometimes I need to repeat this procedure three times before finally gaining access to the directory. Does anyone know what I'm doing wrong? Quote
TCH-Bruce Posted August 25, 2008 Posted August 25, 2008 Never been a fan of using that. Everything you want to access in that directory requires a login/password to access. What are you trying to do? Quote
dcumpian Posted August 25, 2008 Posted August 25, 2008 I'm trying to protect a directory with a password through cPanel using .htaccess. I followed the tutorial provided in cPanel and thought that I had done everything correctly. However, I now find that I'm routinely receiving multiple prompts for username and password. In other words, when I try to access the directory, I'm prompted to enter my username and password. I do so and hit enter, only to receive another such prompt. Sometimes I need to repeat this procedure three times before finally gaining access to the directory. Does anyone know what I'm doing wrong? This can happen if there is a redirect on the server. I had this happen to me before and it turned out that I had to use a slightly different URL to avoid the issue. Example: causes failed login http://www.mywebsite.com/lockeddir works http://www.mywebsite.com/lockeddir/ Regards, Dan Quote
editor Posted August 27, 2008 Author Posted August 27, 2008 Never been a fan of using that. Everything you want to access in that directory requires a login/password to access. What are you trying to do? I was simply trying to protect the single file within that directory. I don't know why it didn't occur to me to try protecting THAT file rather than the whole directory. I've now done that and everything seems to be working well. Thanks for your input. Quote
editor Posted August 27, 2008 Author Posted August 27, 2008 This can happen if there is a redirect on the server. I had this happen to me before and it turned out that I had to use a slightly different URL to avoid the issue. Example: causes failed login http://www.mywebsite.com/lockeddir works http://www.mywebsite.com/lockeddir/ Regards, Dan Thanks for the tip. Before I password protected the single file in my directory (see my reply to Bruce above), I tried adding the trailing slash and found that it did indeed eliminate the multiple prompts. Knowing this may be useful in the future. Thanks again. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.