mercredi 26 juin 2019

I'm having trouble with using .htpasswd

I have project with admin panel. Admin panel folder in the main file directory. localhost/mywebsite/adminpanel

this morning when I was coding, I encrypted the admin panel file with .htpasswd and .htacces file but then I noticed that htaccess also asked for a password in my home directory. After looking for a while I understood the problem. The reason is the include functions that I use in the PHP files in the main directory.

The include functions in my main directory referring to php files in the admin panel folder.

I want .htaccess password auth to work only in the admin panel, not in my home directory. How can I solve this problem?




Aucun commentaire:

Enregistrer un commentaire