The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Password Protection
MR. T
post Jun 11 2007, 05:35 PM
Post #1





Group: Members
Posts: 2
Joined: 10-June 07
Member No.: 3,050



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>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
andyf
post Jul 7 2007, 06:50 AM
Post #2





Group: Members
Posts: 7
Joined: 20-June 07
Member No.: 3,129



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"

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 09:52 PM