reNkai Posted November 28, 2011 Posted November 28, 2011 Hi I have a website which I want to test restricting access with an .htpasswd file. The setup seems simple enough - just create the file, use a password generator to populate the contents of the htpasswd file, then set up your htaccess file and you're good to go. I've done everything correct (I think), but I get 'Internal Server Error 500' on my site when I try it out. I'm thinking possibly the path to the .htpasswd is not correct? What I have in .htaccess is: AuthUserFile /xyz/.htpasswd AuthType Basic AuthName "Login Details" Require valid-user The directory /xyz is in the /public_html folder. Would this path be correct? Or is there another path I should use here? Thanks for any help. Quote
TCH-Bruce Posted November 28, 2011 Posted November 28, 2011 That would not be the path. You would have to enter it as /home/user-id/folder/.htpasswd While I have never tried using it, you might want to check with the help desk to see if it's possible. Quote
reNkai Posted November 28, 2011 Author Posted November 28, 2011 Thanks Bruce that path solved my problem and it works. 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.