protecting my web page and folder from external using .htaccess and .htpassword in php
- by Testadmin
Hai
I want to protect a folder (protect) and the files inside that folder. I have created a .htaccess file and put the following code.
AuthName "Myfolder"
AuthType Basic
AuthUserFile url/protect/.htpasswd
Require valid-user
Also created a .htpassword file which contain
username:password
When I run my URL http://localhost/url/protect, I got a pop up asking username and password, I entered username as username and password as password. After that I got an error page "server error 500"
"The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster."
Why this happened?. Any thing wrong here? Anything needs to see my pages under the folder. Please give me the answer.