Help - Search - Members - Calendar
Full Version: Password Protection
HTMLHelp Forums > Programming > Web Server Configuration
MR. T
Hi,

I am trying to password protect 2 folders using .htaccess but if I add the below code I keep getting a 500 error.

CODE

<Directory /home/user1/web-root/adm>
  AuthType Basic
  AuthName "Restricted Area"
  AuthUserFile /home/user1/.htadm
  AuthGroupFile "/dev/null"
  Require valid-user
</Directory>

<Directory /home/user1/web-root/mod>
  AuthType Basic
  AuthName "Restricted Area"
  AuthUserFile "/home/user1/.htmd"
  AuthGroupFile "/dev/null"
  Require valid-user
</Directory>
andyf
If you create .htaccess on your home computer and FTP it into your account, make sure you upload this file as ASCII, not binary!
If you done this then try re-transfer .htaccess file using FTP ensuring that you are transferring it in ASCII mode.

Also you have placed double quotes in your password file location this could be the reason for getting such error.
QUOTE
AuthUserFile "/home/user1/.htmd"

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.