Welcome to WebmasterWorld Guest from 54.167.155.147

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

.htaccess and .htpasswd

how should i write this file

   
4:23 am on Jun 20, 2003 (gmt 0)

10+ Year Member



hi, i want to do the directory protection, so i upload this two files into the certain folder, but it returned this error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, and inform them of the time the error occurred and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

-------------------------------------------------------------------------
1) .htaccess File:
-------------------------------------------------------------------------
AuthType Basic <br>
AuthName "Your Title"
AuthGroupFile /dev/null
AuthUserFile /usr/local/psa/home/vhosts/zenithgroup.com.my/httpdocs/testing1/.htpasswd

-------------------------------------------------------------------------
2) .htpasswd File:
-------------------------------------------------------------------------
123:$1mm48Gt6Ke5E

can i know what's wrong with this coding? thank you.

4:59 am on Jun 20, 2003 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



watermelon,

See if there is any information in your raw server error log file concerning why you got a 500-Server Error.

You may also want to have a look at this recent thread: [webmasterworld.com...]

Jim

7:18 am on Jun 20, 2003 (gmt 0)

10+ Year Member



watermelon,

Remove the <br> from your first line and make sure that your "AuthUserFile" line does not wrap. Add the "require valid-user" line as shown below. Also, make sure that you upload your .htaccess file in ASCII mode. Here is a sample .htaccess file:

AuthUserFile /absolute/path/to/.htpasswd  
AuthGroupFile /dev/null
AuthName "Private Directory"
AuthType Basic

require valid-user