0

I made a HTML webpage with .htaccess and .htpasswd to provide password protection. If I open the URL via FTP it asks for a password(as it should). If the password is correct, it should navigate me to the specified index.html page, however it starts loading but I get an 500 Internal server error from the host. I suppose it cannot find the index.html...

BUT if I remove the .htaccess file from the folder it can open it with no problem.

My .htaccess looks like this:

AuthType Basic
AuthName "Protected Site"
AuthUserFile /www/myfolder/.htpasswd
require valid-user

Any help would be very appreciated!!

barbara_ko
  • 53
  • 6
  • Thank you, I corrected – barbara_ko Apr 26 '20 at 17:29
  • _“If I open the URL via FTP it asks for a password”_ - that has nothing whatsoever to do with your .htaccess in the first place. .htaccess is configuration of the _web server_, and therefor affects HTTP access. FTP - completely different animal. – CBroe Apr 27 '20 at 08:04
  • _“but I get an 500 Internal server error from the host”_ - then go check what the error log has to say first of all. Not specifying the path to the AuthUserFile is the most common mistake, but it might be something else as well. – CBroe Apr 27 '20 at 08:05
  • Im really beginner of this kind of webmastering stuff, thats why my question is not as accurate as it should be, sorry. The strange thing (for me) is that it works using Xampp apache server (in localhost). But it is not working in another domain server. Suppose the authuserfile path is right, is it possible that the domain server doesnt allow using htaccess? And in this case, can I configure to allow me? – barbara_ko Apr 28 '20 at 09:01
  • It is possible that you are restricted in what you can use, yes. AccessFileName and AllowOverride would be the first two things you should check then. – CBroe Apr 28 '20 at 10:04

0 Answers0