homepage Welcome to WebmasterWorld Guest from 54.145.182.50
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
.htaccess and .htpasswd
how should i write this file
watermelon

10+ Year Member



 
Msg#: 787 posted 4:23 am on Jun 20, 2003 (gmt 0)

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.

 

jdMorgan

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



 
Msg#: 787 posted 4:59 am on Jun 20, 2003 (gmt 0)

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

WarmGlow

10+ Year Member



 
Msg#: 787 posted 7:18 am on Jun 20, 2003 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved