tienphuonghk Posted May 21, 2010 Share Posted May 21, 2010 Hi,I have 2 files .htaccess and .htpasswd to protect file.But when I log file where protect show box require user nad pass.I type corect user and pass but cannot login file I want.It show page internal server error.My error below:eg.htaccessAuthType BasicAuthUserFile /localhost/php/.htpasswdAuthName "Welcome to my Web site"require valid-user.htpasswduser:4hgdf854Show error:Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, tienphuonghk@gmail.com 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.--------------------------------------------------------------------------------Apache/2.2.4 (Win32) PHP/5.2.3 Server at localhost Port 80Please show my error,and fix for me Link to comment Share on other sites More sharing options...
boen_robot Posted May 21, 2010 Share Posted May 21, 2010 Where is the .htpasswd file located really? Unless you have a folder named localhost on your server, that's probably not what you had in mind.Go to the folder where the .htpasswd file is, copy & paste it, and in your .htaccess file, replace AuthUserFile /localhost/php/.htpasswd with AuthUserFile "whateverYouhaveCopied/.htpasswd" (keep the quotes; replace the content with the actual path to the file) Link to comment Share on other sites More sharing options...
tienphuonghk Posted May 22, 2010 Author Share Posted May 22, 2010 Where is the .htpasswd file located really? Unless you have a folder named localhost on your server, that's probably not what you had in mind.Go to the folder where the .htpasswd file is, copy & paste it, and in your .htaccess file, replaceAuthUserFile /localhost/php/.htpasswd with AuthUserFile "whateverYouhaveCopied/.htpasswd" (keep the quotes; replace the content with the actual path to the file) Thank you very much Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.