I have a directory, lets call it sub
, which is a sub-directory of the root directory.
In this subdirectory I have a .htaccess
file which looks like this:
AuthType Basic
AuthName "Initial Zugriff verweigert - Bitte Authentifizieren Sie sich."
AuthUserFile sub/.htpasswd
Require valid-user
DirectoryIndex info.php
sub/
also contains the files: info.php
and the .htpasswd
file.
Whereas info.php
is a simple php file like this:
<?php
phpinfo();
?>
When I put info.php
into the root directory or delete the .htaccess
file it works just fine and shows me the php7 informations, but when put behind the .htaccess
file it gives me a
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
I'm not able to access the apache error logs since I'm on a shared hosting server from 1und1.
I'm thinking the .htaccess
is the problem and I have to allow php to work in the protected directory. How can I accomplish that?