.htaccessauthenticationphpbb3

Internal server error while modifying [.htaccess] for authentification


I want to modify phpbb3 .htaccess to install an authentification on my phpbb 3.2.5 test server. I want to put a user and a password when accessing directory forum.3.2.5 during my test to avoid robots and other users.

I have already use those lines in an other directory and it works properly

AuthName "Pages protegees - pas de moteur de recherche - access restreint"
AuthType Basic
AuthUserFile "/chemin/forum.3.2.5/.htpasswd"
Require valid-user

I have put those 4 lines at the begining .htaccess of phpbb.3.2.5 with the good directory instead of /chemin/ see modified file .htaccess. I haven't got any error on user or password but an internal server error after authentification... The phpbb server doesn't display index.php after authentification.


Solution

  • Your problem, according to my tests on my devserver, are most likely due to an incorrectly placed .htpasswd file. Do not put it in the same folder as the forum. Try placing it, instead, into the /chemin folder...

    IE:

    AuthName "Pages protegees - pas de moteur de recherche - access restreint"
    AuthType Basic
    AuthUserFile "/chemin/.htpasswd"
    Require valid-user