My .htaccess only works the first time and then gives me error 500

Viewed 116

For several days I have been trying to set up .htaccess just for one folder I have on my webserver. I would like it to be password protected. It doesn't have to be super secure just has to have some password protection. However it never works. I have tried different versions and even ended up watching some YouTube-videos but still no result. It shows the pop-up window the first time if I try from a webbrowser that I didn't try already. If I clear the cache it will work again the first time and then never again. After having entered my username and password I get error 500. I am not sure what is wrong with my code. I think I should mention that the .htaccess and the .htpasswd are in the same directory because I wanted to make sure that the code is working --> which it isn't. I would appreciate any help or suggestions.

Heres my .htaccess:

AuthType Basic
AuthName "restricted area"
AuthUserFile /home/strato/http/power/rid/35/73/51613XXX/htdocs/.htpasswd
require valid-user

And here's my .htpasswd

Aleksandar:$1$3GJ12/5h$IELRGaNF5aE88HE.MkIj40

Thanks in advance,

Kind Regards, Aleksandar

0 Answers
Related