Welcome to WebmasterWorld Guest from 22.214.171.124
I am trying to password protect one of my folder called Admin by .htaccess with the following script:
AuthName "Admin Control Panel"
<Limit GET PUT POST>
require user alexandra
and a htpasswd file:
but it seems not work properly, the popup window requires password all the time, anyone can help me?
thanks in advance!
Anyway, the files should be uploaded to the server as ASCII, not binary. You wouldn't be the first to make that error. Also, did you try a site search? There's lots of information around here.
[edited by: jatar_k at 3:56 pm (utc) on Aug. 26, 2003]
When I click on it I then see these folders:
When I click public_html I see a folder and a file:
When I click catalog I see this folder:
I want to password protect the admin folder with an .htaccess file. Here is the content of the .htaccess file that I've uploaded into the admin folder:
AuthName "Restricted Directory"
require user patrick
I also have an .htpasswd file with content like this:
I believe the password is encrypted correctly in relation to my actual password.
Apparently I have shell access and also both files were uploaded as ASCII. Now when I navigate to the folder www.mydomain.com/catalog/admin I'm asked for a username and password but when I enter the password I can't access the admin folder, and I suspect this is because I haven't understood where to place the .htpasswd file in relation to the path in my .htaccess file. Any advice on how to resolve this would be appreciated. Where should I place the .htpasswd file and what should the correct path be in my .htaccess file?
I now have it working, with this .htaccess file:
AuthName "We require your authorisation."
... but I've had to put the .htpasswd file in the same admin folder as the .htaccess file to make it work, which I believe is not very secure. Where would I place the .htpasswd file above the public area, and would I need to change the path in the .htaccess file?