Error 500 while using .htpasswd

I have a directory setup with .htaccess and .htpasswd. It gives me the promt to login, I login then it gives me the error 500. Any idea why that’s happening?

Enable error reporting in General settings -> error reporting and tell what error message you get

It says its enabled. This is what I get:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@000webhost.io to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.

what is your domain name?

It is sangam1.tk/test/test.php
username test
password test

I know you said you are using .htpasswd but 000webhost has password protection built into the new panel if you want to try that?

Login to the members area and hit security.

I tried that initially but it didn’t work either.

Oh? :frowning:

https://maian-lockbox.000webhostapp.com/protected/

user: test
password: password

:unamused: that worked. why doesn’t mine

this is the .htaccess file:
AuthType Basic
AuthName "Protect!"
AuthUserFile /home/971208/public_html/test/.htpasswd
Require user sangam1

Nvm I got it to work. I had the stuff wrong in .htaccess.

1 Like

Correction. Its broken again. I didn’t change anything.

The code within /protected/

.htaccess

# HTID:610846: DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES BELOW
AuthType Basic
AuthName "Restricted Access"
AuthUserFile "/storage/h5/190/1000190/public_html/protected/.htpasswd"
Require user test
# DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES ABOVE HTID:610846:

The code within .htpasswd

okay. thank you. that helped.

Any issues do post back :slight_smile:!!!